解决ros-foxy打包package为deb安装包问题
安装依赖
1
| sudo apt install python3-bloom python3-rosdep fakeroot debhelper dh-python
VIM
|
rosdep init失败
打开host及相关文件进行修改
1 2
| sudo gedit /etc/hosts
AWK
|
在ipv4的部分加入
1 2 3 4 5 6 7 8
| 185.199.108.133 raw.githubusercontent.com
185.199.109.133 raw.githubusercontent.com
185.199.110.133 raw.githubusercontent.com
185.199.111.133 raw.githubusercontent.com
ACCESSLOG
|
再次运行sudo rosdep init,需要多尝试几次
rosdep update报错
通过git clone将安装包下载
1 2
| git clone https://github.com/ros/rosdistro.git
AWK
|
修改rep3.py
进入路径
1
| cd /usr/lib/python3/dist-packages
AWK
|
修改文件
1
| sudo gedit rosdep2/rep3.py
SMALI
|
将原来的 REP3_TARGETS_URL = ‘
https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml’用 # 注释掉,修改成以下代码,主要是把你的文件路径进行替换,下面的文件路径是我装的时候的路径
将
1
| REP3_TARGETS_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml'
INI
|
替换为
1 2
| REP3_TARGETS_URL = 'file:///home/qiang/Documents/rosdistro/releases/targets.yaml'
INI
|
其中/home/qiang/Documents/rosdistro为rosdistro文件所在路径,根据文件所在位置改成自己的路径
修改sources_list.py
1 2
| sudo gedit rosdep2/sources_list.py
BASH
|
将
1
| DEFAULT_SOURCES_LIST_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list'
INI
|
替换为
1 2
| DEFAULT_SOURCES_LIST_URL = 'file:///home/qiang/Documents/rosdistro/rosdep/sources.list.d/20-default.list'
INI
|
修改init.py
1 2
| sudo gedit rosdistro/__init__.py
ASCIIDOC
|
将
1
| DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
INI
|
替换为
1 2
| DEFAULT_INDEX_URL = 'file:///home/qiang/Documents/rosdistro/index-v4.yaml'
INI
|
修改20-default.list
1 2
| cd /etc/ros/rosdep/sources.list.d
AWK
|
1 2
| sudo gedit 20-default.list
LSL
|
将
1 2 3 4 5 6 7 8 9 10 11
| yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
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
AWK
|
替换为
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
yaml file:///home/qiang/Documents/rosdistro/rosdep/osx-homebrew.yaml osx
yaml file:///home/qiang/Documents/rosdistro/rosdep/base.yaml
yaml file:///home/qiang/Documents/rosdistro/rosdep/python.yaml
yaml file:///home/qiang/Documents/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/qiang/Documents/rosdistro/releases/fuerte.yaml fuerte
AWK
|
修改另一处init.py
1
| cd /usr/local/lib/python3.8/dist-packages/rosdistro
AWK
|
将
1
| DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
INI
|
替换为
1
| DEFAULT_INDEX_URL = 'file:///home/qiang/Documents/rosdistro/index-v4.yaml'
INI
|
rosdep update
1
| rosdep update --include-eol-distros
N1QL
|
Build the debian from the package
1 2 3
| cd /path/to/pkg_source # this should be the directory that contains the package.xml bloom-generate rosdebian fakeroot debian/rules binary
VERILOG
|