如下:
curl -O https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc
-bash: curl: command not found
gpg: no valid OpenPGP data found.
curl : Depends: libcurl4 (= 7.58.0-2ubuntu3) but 7.58.0-2ubuntu3.16 is to be installed
E: Unable to correct problems, you have held broken packages.
卸载重新安装解决
sudo apt-get purge libcurl4
sudo apt-get install curl
如下:
ljx@ljx-desktop:~/rosdistro-0.8.3$ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
gpg: no valid OpenPGP data found.
分开使用并且将-s 改成大写-O
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc
sudo apt-key add ros.asc
如下:
Failed to connect to raw.githubusercontent.com port 443: Connection refused
解决方式一
(1)打开网站: https://www.ipaddress.com/
查询一下 raw.githubusercontent.com对应的IP 地址
![](https://img-blog.csdnimg.cn/680ddb33e37e4ef5a9757d0155c5196a.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA5peg6K-B6am-6am25qKB5ZeW5ZeW,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)
sudo vi /etc/hosts
![](https://img-blog.csdnimg.cn/2b47b421f7364113b76826ab44ddb902.png#pic_center)
E: Unable to locate package ros-noetic-desktop-full
sudo apt-get update
sudo apt install ros-noetic-desktop-full
注意上面这两个命令Ubuntu16可以
或者ubuntu18用下面的
sudo apt-get update
sudo apt-get install ros-melodic-desktop-full
参考官网:http://wiki.ros.org/melodic/Installation/UbuntuROS官网地址
dpkg: error processing archive /var/cache/apt/archives/python-rospkg-modules_1.3.0-1_all.deb (–unpack):
trying to overwrite ‘/usr/lib/python2.7/dist-packages/rospkg/init.py’, which is also in package python-rospkg 1.1.4-1
Preparing to unpack …/python-rosdistro-modules_0.8.3-1_all.deb …
Unpacking python-rosdistro-modules (0.8.3-1) …
dpkg: error processing archive /var/cache/apt/archives/python-rosdistro-modules_0.8.3-1_all.deb (–unpack):
trying to overwrite ‘/usr/lib/python2.7/dist-packages/rosdistro/init.py’, which is also in package python-rosdistro 0.6.6-1
Errors were encountered while processing:
/var/cache/apt/archives/python-rospkg-modules_1.3.0-1_all.deb
/var/cache/apt/archives/python-rosdistro-modules_0.8.3-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
解决方法如下:
sudo dpkg -i --force-overwrite /var/cache/apt/archives/python-rospkg-modules_1.3.0-1_all.deb
sudo apt-get -f install
sudo dpkg -i --force-overwrite /var/cache/apt/archives/python-rosdistro-modules_0.8.3-1_all.deb
sudo apt-get -f install