ubuntu搭建APT源简单方法

2023-05-16

一、为什么需要搭建APT源

原因如下:

1、在公司内网离线情况下,ubuntu无法通过apt原生源进行下载

2、有些源国内无法正常访问,需要翻墙

基于以上原因,需要自建APT源

二、准备条件

  1. 需要能够上网的电脑,最好能够登录github、google等外网电脑
  2. 需要一台ubuntu的机器,磁盘要足够大

三、APT环境搭建

3.1、安装apt-mirror软件

sudo apt-get install apt-mirror

3.2、修改mirror.list配置文件

sudo mkdir -p /var/www/html
sudo vi /etc/apt/mirror.list

我的配置文件如下:

############# config ##################
# 设置数据存储目录,路径必须提前存在
# set base_path    /var/spool/apt-mirror
set base_path /var/www/html

# 设置镜像存储位置
# set mirror_path  $base_path/mirror

# 设置临时下载索引位置
# set skel_path    $base_path/skel

# 设置日志,URLs和MD5校验信息存储位置
# set var_path     $base_path/var

# 配置删除过期源脚本位置(默认不删除,方便安装旧版本软件)
# set cleanscript $var_path/clean.sh

# 设置默认架构,i386/amd64,默认下载与本机相同的架构
# set defaultarch  <running host architecture>
set defaultarch amd64

# 设定下载后运行的脚本位置
# set postmirror_script $var_path/postmirror.sh

# 设置是否执行 下载后的脚本操作,默认是1(但是默认没有postmirror.sh脚本)
# set run_postmirror 0

# 设置下载线程数
set nthreads     20

# 是否替换URL中的波浪线,替换成%7E(HTML代码),否则会跳过不进行下载
set _tilde 0
#
############# end config ##############

# ubuntu的APT软件源
#deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
#deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
#deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
#deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
#deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
#deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
#deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
#deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
#deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
#deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

#clean http://mirrors.ustc.edu.cn ubuntu

# nvidia-docker2 源
#deb https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/$(ARCH) / 
#直接使用nvidia-docker2 源地址会有问题,需要修改如下才可以
deb https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64 /
#deb https://nvidia.github.io/libnvidia-container/experimental/ubuntu18.04/$(ARCH) /
deb https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/amd64 /
#deb https://nvidia.github.io/nvidia-container-runtime/experimental/ubuntu18.04/$(ARCH) /
deb https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64 /

# docker-ce源
deb https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu bionic stable

# ros源
deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ bionic main

# vscode源
#deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main

# bazel源
deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8

clean https://nvidia.github.io ubuntu
clean https://mirrors.tuna.tsinghua.edu.cn ubuntu
clean http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu
clean http://packages.microsoft.com/repos/code

3.3、开始下载镜像软件

sudo apt-miiror

下载镜像过程时间比较长,需要耐心等待。执行过程如下:

root@HANZHIWEI02:~# apt-mirror
Downloading 57 index files using 20 threads...
Begin time: Fri Jan 28 14:20:18 2022
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]...
End time: Fri Jan 28 14:20:29 2022

Processing translation indexes: [TTTTTT]

Downloading 0 translation files using 0 threads...
Begin time: Fri Jan 28 14:20:29 2022
[0]...
End time: Fri Jan 28 14:20:29 2022

Processing DEP-11 indexes: [DDDDDD]

Downloading 0 dep11 files using 0 threads...
Begin time: Fri Jan 28 14:20:29 2022
[0]...
End time: Fri Jan 28 14:20:29 2022

Processing indexes: [PPPPPP]

2.2 GiB will be downloaded into archive.
Downloading 707 archive files using 20 threads...
Begin time: Fri Jan 28 14:20:30 2022
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]...
End time: Fri Jan 28 14:31:46 2022

4.1 GiB in 1406 files and 2 directories can be freed.
Run /mnt/e/ubuntu-apt/var/clean.sh for this purpose.

Running the Post Mirror script ...
(/var/www/html/var/postmirror.sh)

Post Mirror script has completed. See above output for any possible errors.

3.4、安装nginx

sudo apt-get install nginx

3.5、配置nginx的服务

sudo vi /etc/nginx/sites-available/default

我的配置文件如下:

##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Default server configuration
#
server {
    listen 80 default_server;
        # 设置中文编码支持
    charset utf-8; 
    # listen [::]:80 default_server;

    # SSL configuration
    #
    #listen 443 ssl default_server;
    #listen [::]:443 ssl default_server;
    #
    # Note: You should disable gzip for SSL traffic.
    # See: https://bugs.debian.org/773332
    #
    # Read up on ssl_ciphers to ensure a secure configuration.
    # See: https://bugs.debian.org/765782
    #
    # Self signed certs generated by the ssl-cert package
    # Don't use them in a production server!
    #
    # include snippets/snakeoil.conf;

    #ssl_certificate   /mnt/e/ubuntu-apt/key/server.crt;
    #ssl_certificate_key  /mnt/e/ubuntu-apt/key/server.key;
    #ssl_session_timeout 5m;
    #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    #ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
    #ssl_prefer_server_ciphers  on;

    #ssl_ciphers  HIGH:!aNULL:!MD5;


    # 显示目录
    autoindex on;
    
    # 镜像所在的目录
    root /var/www/html;

    # Add index.php to the list if you are using PHP
    index index.html index.htm index.nginx-debian.html;

    # server_name _;
    server_name <本机ip地址>;

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
        #autoindex on;
                #autoindex_exact_size off;
                #autoindex_localtime on;
    }

    # pass PHP scripts to FastCGI server
    #
    #location ~ \.php$ {
    #   include snippets/fastcgi-php.conf;
    #
    #   # With php-fpm (or other unix sockets):
    #   fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
    #   # With php-cgi (or other tcp sockets):
    #   fastcgi_pass 127.0.0.1:9000;
    #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #   deny all;
    #}
}


# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
#   listen 80;
#   listen [::]:80;
#
#   server_name example.com;
#
#   root /var/www/example.com;
#   index index.html;
#
#   location / {
#       try_files $uri $uri/ =404;
#   }
#}

3.6、重启 nginx 服务

sudo service nginx restart

在浏览器打开http://IP,能够考到以下页面,这表示搭建成功

image-20220128144010463

四、修改内网APT源

经过第三章内容, 已经搭建好了简易的APT镜像源,现在只需要将内网电脑上的APT源修改为自己搭建的源即可

修改/etc/apt/sources.list文件

sudo vi  /etc/apt/sources.list

将下面内容:

deb https://repo.t3caic.com/repository/apt-aliyun/ bionic main restricted universe multiverse
deb https://repo.t3caic.com/repository/apt-aliyun/ bionic-security main restricted universe multiverse
deb https://repo.t3caic.com/repository/apt-aliyun/ bionic-updates main restricted universe multiverse
deb https://repo.t3caic.com/repository/apt-aliyun/ bionic-proposed main restricted universe multiverse
deb https://repo.t3caic.com/repository/apt-aliyun/ bionic-backports main restricted universe multiverse

# docker
#deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu bionic stable

# nvidia-docker2
deb https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/$(ARCH) /

deb https://nvidia.github.io/libnvidia-container/experimental/ubuntu18.04/$(ARCH) /

deb https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/$(ARCH) /

deb https://nvidia.github.io/nvidia-container-runtime/experimental/ubuntu18.04/$(ARCH) /

deb https://nvidia.github.io/nvidia-docker/ubuntu18.04/$(ARCH) /

# ros
deb https://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ bionic main

# vscode
deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/repos/code stable main

# bazel
deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8

替换为以下内容即可:

  1. 在url中添加自己的ip地址
  2. https需要替换为http,因为搭建的nginx服务没有启用ssl验证

deb https://repo.t3caic.com/repository/apt-aliyun/ bionic main restricted universe multiverse
deb https://repo.t3caic.com/repository/apt-aliyun/ bionic-security main restricted universe multiverse
deb https://repo.t3caic.com/repository/apt-aliyun/ bionic-updates main restricted universe multiverse
deb https://repo.t3caic.com/repository/apt-aliyun/ bionic-proposed main restricted universe multiverse
deb https://repo.t3caic.com/repository/apt-aliyun/ bionic-backports main restricted universe multiverse

# docker
#deb [arch=amd64] http://<自己搭建的ip地址>/mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu bionic stable

# nvidia-docker2
deb http://<自己搭建的ip地址>/nvidia.github.io/libnvidia-container/stable/ubuntu18.04/$(ARCH) /

deb http://<自己搭建的ip地址>/nvidia.github.io/libnvidia-container/experimental/ubuntu18.04/$(ARCH) /

deb http://<自己搭建的ip地址>/nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/$(ARCH) /

deb http://<自己搭建的ip地址>/nvidia.github.io/nvidia-container-runtime/experimental/ubuntu18.04/$(ARCH) /

deb http://<自己搭建的ip地址>/nvidia.github.io/nvidia-docker/ubuntu18.04/$(ARCH) /

# ros
deb http://<自己搭建的ip地址>/mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ bionic main

# vscode
deb [arch=amd64,arm64,armhf] http://<自己搭建的ip地址>/packages.microsoft.com/repos/code stable main

# bazel
deb [arch=amd64] http://<自己搭建的ip地址>/storage.googleapis.com/bazel-apt stable jdk1.8

经过以上步骤,被隔离在内网的电脑能够通过可以访问外网服务电脑来安装所需的apt。

五、rosdep离线源的搭建部署

5.1、解决rosdep init问题

在内网离线执行rosdep init的时候有可能会遇到以下问题:

hanzhiwei@T4-046:~$ sudo rosdep init
ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.

解决方案一:

  1. 20-default.list下载下来

  2. 20-default.list文件放到/etc/ros/rosdep/sources.list.d目录即可,如果该目录不存在可以新建

解决方案二:

  1. 20-default.list下载下来

  2. 按照apt源的方式,放到nginx的/var/www/html/raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d目录下

  3. 修改/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py文件,将:

    DEFAULT_SOURCES_LIST_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list'

    修改为:

    DEFAULT_SOURCES_LIST_URL = 'http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list'

    即可

5.2、解决rosdep update问题

在内网环境新执行rosdep update汇报以下问题:

hanzhiwei@T4-046:~$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:
<urlopen error [Errno 0] Error> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml]:
<urlopen error [Errno 0] Error> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml]:
<urlopen error [Errno 0] Error> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml]:
<urlopen error [Errno 0] Error> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml)

解决方法如下:

  1. 将以下内容下载下来,按照APT源搭建方式,放到nginx/var/www/html下的对应目录下

    https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml

    https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml

    https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml

    https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml

    https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml

    https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml

    https://raw.github.com/ros/rosdistro/master/releases/targets.yaml

  2. 修改20-default.list文件内容

    sudo vi /etc/ros/rosdep/sources.list.d/20-default.list
    

    将以下内容:

    # os-specific listings first
    yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx

    # generic
    yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
    yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
    yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
    gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte

    # newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

    修改为:

    # os-specific listings first
    yaml http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx

    # generic
    yaml http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
    yaml http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
    yaml http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
    gbpdistro http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte

    # newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

  3. 修改rep3.py文件

    sudo vi /usr/lib/python2.7/dist-packages/rosdep2/rep3.py
    

    将以下内容:

    REP3_TARGETS_URL = 'https://raw.github.com/ros/rosdistro/master/releases/targets.yaml'

    修改为:

    REP3_TARGETS_URL = 'http://<自己搭建的ip地址>/raw.github.com/ros/rosdistro/master/releases/targets.yaml'

  4. 修改__init__.py文件

    sudo vi /usr/lib/python2.7/dist-packages/rosdistro/__init__.py
    

    将以下内容:

    DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'

    修改为:

    DEFAULT_INDEX_URL = 'http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'

  5. 已上修改好后,如果直接执行rosdep update,会发现以下错误

    root@T4-046:~# rosdep update
    reading in sources list data from /etc/ros/rosdep/sources.list.d
    Warning: running 'rosdep update' as root is not recommended.
    You should run 'sudo rosdep fix-permissions' and invoke 'rosdep update' again without sudo.
    Hit http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
    Hit http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
    Hit http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
    Hit http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
    Hit http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
    Query rosdistro index http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
    Add distro "ardent"
    ERROR: error loading sources list:
    HTTP Error 404: Not Found (http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/ardent/distribution.yaml)

  6. 这是因为在index-v4.yaml文件中还有部分文件需要进行下载,根据错误提示和对index-v4.yaml文件进行内容解读,发现还需要下载以下文件,并放到nginx/var/www/html下的对应目录下

    https://raw.githubusercontent.com/ros/rosdistro/master/ardent/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/bouncy/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/crystal/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/dashing/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/eloquent/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/foxy/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/galactic/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/groovy/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/hydro/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/indigo/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/jade/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/kinetic/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/lunar/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/melodic/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/noetic/distribution.yaml
    https://raw.githubusercontent.com/ros/rosdistro/master/rolling/distribution.yaml

  7. 以上文件下载好后,再执行rosdep update即可完成相关操作,执行过程如下

    root@T4-046:~# rosdep update
    reading in sources list data from /etc/ros/rosdep/sources.list.d
    Warning: running 'rosdep update' as root is not recommended.
    You should run 'sudo rosdep fix-permissions' and invoke 'rosdep update' again without sudo.
    Hit http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
    Hit http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
    Hit http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
    Hit http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
    Hit http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
    Query rosdistro index http://<自己搭建的ip地址>/raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
    Add distro "ardent"
    Add distro "bouncy"
    Add distro "crystal"
    Add distro "dashing"
    Add distro "eloquent"
    Add distro "foxy"
    Add distro "galactic"
    Add distro "groovy"
    Add distro "hydro"
    Add distro "indigo"
    Add distro "jade"
    Add distro "kinetic"
    Add distro "lunar"
    Add distro "melodic"
    Add distro "noetic"
    Add distro "rolling"
    updated cache in /root/.ros/rosdep/sources.cache

5.3、nginx下的目录结构

下载对应文件,存放在nginx目录结构如下,仅供参考:

└── var
└── www
└── html
├── raw.github.com
│ └── ros
│ └── rosdistro
│ └── master
│ └── releases
│ └── targets.yaml
└── raw.githubusercontent.com
└── ros
└── rosdistro
└── master
├── ardent
│ └── distribution.yaml
├── bouncy
│ └── distribution.yaml
├── crystal
│ └── distribution.yaml
├── dashing
│ └── distribution.yaml
├── eloquent
│ └── distribution.yaml
├── foxy
│ └── distribution.yaml
├── galactic
│ └── distribution.yaml
├── groovy
│ └── distribution.yaml
├── hydro
│ └── distribution.yaml
├── index-v4.yaml
├── indigo
│ └── distribution.yaml
├── jade
│ └── distribution.yaml
├── kinetic
│ └── distribution.yaml
├── lunar
│ └── distribution.yaml
├── melodic
│ └── distribution.yaml
├── noetic
│ └── distribution.yaml
├── releases
│ └── fuerte.yaml
├── rolling
│ └── distribution.yaml
└── rosdep
├── base.yaml
├── osx-homebrew.yaml
├── python.yaml
├── ruby.yaml
└── sources.list.d
└── 20-default.list

参考文档

http://t.zoukankan.com/superbi-p-13409529.html
https://www.cnblogs.com/zhjblogs/p/14875296.html

https://www.jianshu.com/p/663eac18665a

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ubuntu搭建APT源简单方法 的相关文章

随机推荐

  • 【算法】AB3DMOT之Sutherland Hodgman多边形裁剪

    在AB3MOT模型中有一个步骤为计算IOU时 xff0c 需要先计算两个立体在地面的投影2D形状 xff0c 然后计算两个投影的重叠部分 xff0c 实际上为多边形的裁剪算法 AB3MOT span class token decorato
  • 【英语】学习记录——5/10

    1 美剧 英雄联盟 xff1a 双城之战 第一季 硅谷 第一季 硅谷 第二季 硅谷 第三季 第五集 2 书籍 书籍阅读工具ReadPaper Thinking Fast and Slow by psychologist Daniel Kah
  • 【Python】画折线图在坐标轴上的点遮挡与去除冗余网格问题

    1 代码 span class token keyword import span numpy span class token keyword as span np span class token keyword import span
  • 【Python】可视化KITTI激光雷达点云&绘制立体框

    更新2023 5 4不如open3d好用 xff0c 依赖太多 xff0c 已转用open3d库 前言 最近在复现PointRCNN论文过程中发现没有可视化代码 xff0c 于是查找资料找到了 xff1a pointRCNN 结果可视化 t
  • 【Python】PointRCNN在线可视化点云与图像

    前言 花了一周多的时间对PointRCNN进行了模型的阅读与复现 xff0c 发现代码没有可视化程序 xff0c 并且开源的可视化程序 xff0c 也是离线的 xff0c 将检测的结果 xff0c 一帧一帧保存并拼接成视频 xff0c 很难
  • MindSpore中张量和Numpy的互相转换

    NumPy 是 Python 语言的一个扩展程序库 支持大量的维度数组与矩阵运算 此外也针对数组运算提供大量的数学函数库 所以下面展示下MindSpore中张量和Numpy类型的互相转换 张量转换为NumPy zeros 61 ops Ze
  • 云安全-Python实现凯撒密码和替换密码的加密解密与暴力破解

    记录顺带保存一次课堂作业 xff0c 部分参考了现有的实现 xff0c 结合需求进行了一波码 xff0c 能用就行 xff0c 人和代码能跑一个就好 xff0c 替换密码暴力破解实在懒得搞了 xff0c 或许以后会更 xff1f span
  • Windows下编程需要看哪些书

    Windows 下编程需要看哪些书 本人是自学计算机的 xff0c 所有计算机方面的知识都看 xff0c 研究过一段时间网络 xff0c 对计算机网络方面有一定的基础 xff0c 对程序设计尤感兴趣 xff0c 个人认为学习 Windows
  • 找工作经验贴----转自cc98 (作者ID:qzz88 ) 仅为收藏,感谢原作者的经验分享

    原帖地址 xff1a http www cc98 org dispbbs asp BoardID 61 248 amp id 61 3813130 amp page 61 amp replyID 61 3813130 amp star 61
  • QGC、PX4和AirSim的安装

    本教程视频地址 xff1a https www bilibili com video BV1dv411K71E 本教程将讲解QGC地面站的安装 PX4控制系统 xff08 包括jMAVSim ROS和Gazebo xff09 的安装 Air
  • Ominibus F4V3 Pro飞控原理图和接线图

    Ominibus F4V3 Pro飞控接线图如下图所示 部分实物接线图如下 注意上图中 xff0c 电流计入口 描述是错误的 xff0c 最形象的是第一个接线图 xff0c 那里表的很清楚 电源这块接线为电池接线到飞控板上的电池 43 和电
  • Mini Crossbow AAT自动跟踪云台设置(配合TeleFlyTiny模块)

    飞行器在空中 xff0c 位置和方位时刻变化 xff0c 而我们使用的图传接收机 xff0c 需要时刻保持跟随飞行器材能捕获较好的图像 xff0c 靠人去调整地面天线角度是不太合适的 xff0c 所以我们可以使用AAT自动跟踪云台来完成调整
  • Mission Planner安卓安装包

    可以在安卓手机上安装并使用的安装包 下载地址 xff1a https download csdn net download xjhappyarrow 22864716 spm 61 1001 2014 3001 5503
  • Docker 相关配置文件路径

    配置文件参数 xff1a 1 优先解析在config file命令行参数 2 在root模式下 Docker Daemon 默认配置文件路径 etc docker daemon json 3 在rootless模式下 默认配置文件路径在 d
  • 1. 【gRPC系列学习】 gRPC起源、优缺点

    gRPC是一项进程间通信技术 xff0c 可以用来连接 调用 操作 调试分布式异构应用程序 xff0c 就像调用本地函数一样 gRPC主要采用同步的请求 响应进行通信 xff0c 但建立连接后 xff0c 它可以完全以异步模式进行操作 1
  • stlink灯一直闪

    灯闪说明stlink工作不正常 原因可能是 xff1a 1 stlink供电不足 试着用外部电源和stlink同时给板子供电 2 电脑的USB口硬件 xff08 USB口烧了 xff0c 但可能性比较少 xff09 或USB相关驱动有问题
  • stlink使用笔记

    1 stlink灯一直闪 2 当用外部电源 xff08 外部 就是不直接使用stlink为板子供电 xff09 为板子供电时 xff0c 如果要用stlink xff08 SWD模式 xff09 xff0c 那么不能只插SWCLK和SWDI
  • 先电OpenStack创建云主机报错500

    现象 xff1a 从报错中可定位到问题出在nova的conductor组件中 日志 xff1a 查看 var log nova nova conductor log 从日志中可以观察到是因为找不到cpu特性 解决方法 xff1a 进入 us
  • MAVROS + APM + pixhawk 填坑日记(一)

    64 TOC MAVROS 43 APM 43 pixhawk 填坑日记 一 树莓派和pixhawk通过usb串口连接 xff0c 想通过mavros读取飞控上关于GPS的位置信息 rostopic list可以看到mavros发布的话题消
  • ubuntu搭建APT源简单方法

    一 为什么需要搭建APT源 原因如下 xff1a 1 在公司内网离线情况下 xff0c ubuntu无法通过apt原生源进行下载 2 有些源国内无法正常访问 xff0c 需要翻墙 基于以上原因 xff0c 需要自建APT源 二 准备条件 需