nano安装ROS melodic文件错误问题broken packages

nano安装ROS melodic文件错误问题broken packages


参考链接

反复多次尝试安装ros melodic,一直报错,有文件损坏或者安装依赖问题。

直接进入安装阶段,前面的请看其他详细帖子。

sudo apt-get install ros-melodic-desktop-full

在输入以上命令后,会出现you have held broken packages的问题。
案例如下:

sudo apt-get install ros-melodic-desktop-full
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ros-melodic-desktop-full : Depends: ros-melodic-desktop but it is not going to be installed
                            Depends: ros-melodic-perception but it is not going to be installed
                            Depends: ros-melodic-simulators but it is not going to be installed
                            Depends: ros-melodic-urdf-sim-tutorial but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

按照其他博主的提示输入如下,

sudo  aptitude install ros-kinetic-desktop-full 

如果不支持aptitude,可以安装下

sudo apt-get install aptitude

然后会有如下部分文字:

Accept this solution? [Y/n/q/?] 

我第一次选择Y,安装过程跳出:

Accept this solution? [Y/n/q/?] Y
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

看似完成,实际上系统什么也没干,继续用aptitude再来一遍,
第一次选择n,会跳出来一些安装依赖库,再选择Y后,安装过程展示出来。

Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

     Downgrade the following packages:                                        
1)     libgpgme11 [1.10.0-1ubuntu2.1 (now) -> 1.10.0-1ubuntu1 (bionic)]       
2)     libqt5qml5 [5.9.5-0ubuntu1.1 (now) -> 5.9.5-0ubuntu1 (bionic)]         
3)     libqt5quick5 [5.9.5-0ubuntu1.1 (now) -> 5.9.5-0ubuntu1 (bionic)]       
4)     libqt5quickwidgets5 [5.9.5-0ubuntu1.1 (now) -> 5.9.5-0ubuntu1 (bionic)]
5)     libuuid1 [2.31.1-0.4ubuntu3.6 (now) -> 2.31.1-0.4ubuntu3 (bionic)]     



Accept this solution? [Y/n/q/?] Y
The following packages will be DOWNGRADED:
  libgpgme11 libqt5qml5 libqt5quick5 libqt5quickwidgets5 libuuid1 
The following NEW packages will be installed:
  cython{a} fltk1.3-doc{a} fluid{a} fonts-lato{a} gazebo9{a} 
  gazebo9-common{a} gazebo9-plugin-base{a} google-mock{a} hddtemp{a} 

最后顺利安装完成,只能说ROS安装的依赖项目太多了,不知道安装哪个文件就会和它冲突。

Processing triggers for install-info (6.5.0.dfsg.1-2) ...
                                         
root@yuezh-ThinkStation-P320:/# sudo apt-get install ros-melodic-desktop-full
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ros-melodic-desktop-full is already the newest version (1.4.1-0bionic.20200604.134848).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

关于Rosdep失效的问题

找不到rosdep

sudo apt-get install python-rosdep

rosdep init rosdep update无用

解决方法

猜你喜欢

转载自blog.csdn.net/ahelloyou/article/details/114917160