美文网首页
Yocto之apt-get安装deb包环境搭建

Yocto之apt-get安装deb包环境搭建

作者: 小田BSP | 来源:发表于2021-03-19 21:52 被阅读0次

    本文介绍apt-get install命令安装deb包的测试环境搭建方法。

    搭建环境:WIN10+Ubuntu18.04虚拟机。

    1、虚拟机配置

    1)安装Apache2

    apt-get install apache2
    

    2)制作deb包源

    cd /var/www/html/
    ## 新建文件夹,必须和后面win的访问地址、单板source.list的配置一致
    mkdir test && cd test/
    拷贝deb包到test目录下
    
    ## 使用无签名验证deb包安装
    dpkg-scanpackages ./ /dev/null | gzip > Packages.gz
    

    注:使用虚拟机时,需要配置桥接模式,否则单板和虚拟机之间无法ping通。

    2、WIN系统配置

    在WIN系统的浏览器输入虚拟机地址,可以看到相关的deb文件,如:

    http://192.168.2.134:80/test   ## test位置:/var/www/html/test
    

    地址格式:

    http://[ubuntu ip]:[port]/test
    

    3、单板配置

    在系统启动后,按照如下配置:

    ## 设置source.list,注意IP地址和deb和虚拟机IP,文件夹名保存一致
    cd /etc/apt/
    vi source.list
    deb http://192.168.2.134/test /
    
    ## 由于是无签名源,需要使用--allow-insecure-repositories
    apt-get update --allow-insecure-repositories
    
    ## 安装deb,例:vim
    apt-get install vim
    

    相关文章

      网友评论

          本文标题:Yocto之apt-get安装deb包环境搭建

          本文链接:https://www.haomeiwen.com/subject/nbwbcltx.html