本篇博客主要是解决ROS安装过程中的如下问题:
The following packages have unmet dependencies:
ros-indigo-desktop-full : Depends: ros-indigo-desktop but it is not going to be installed
Depends: ros-indigo-perception but it is not going to be installed
Depends: ros-indigo-simulators but it is not going to be installed
E: Unable to correct problems, you have held broken packages.`
历经千难万险,将近一周的时间终于把ros-indigo在ubuntu14上安装好了,尝试了各种办法都不奏效,最终找到了正确的方法,总结一下。按照官网上的安装方法 http://wiki.ros.org/indigo/Installation/Ubuntu
一步一步来:
1.
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'2.
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA1163.
sudo apt-get update4.
sudo apt-get install libgl1-mesa-dev-lts-trusty (此项解决ros安装的依赖问题,然而在我的电脑上并没有什么卵用)5.
sudo apt-get install ros-indigo-desktop-full
就在此时出现严重问题,提示:
The following packages have unmet dependencies:
ros-indigo-desktop-full : Depends: ros-indigo-desktop but it is not going to be installed
Depends: ros-indigo-perception but it is not going to be installed
Depends: ros-indigo-simulators but it is not going to be installed
E: Unable to correct problems, you have held broken packages.`
此时尝试过各种方法都无法安装,最后用如下的安装方式安装好了:
输入: sudo aptitude install ros-indigo-desktop-full
然后会列出一大堆有关ros的东西,让你选择Accept this solution? [Y/n/q/?],选择n
然后会出现
The following actions will resolve these dependencies:
Install the following packages:
........................................................(各种依赖项)
Accept this solution? [Y/n/q/?]选择Y
然后等待安装就好了,接下来按照官网上的安装就好了。
sudo rosdep init rosdep update echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc source ~/.bashrc source /opt/ros/indigo/setup.bash sudo apt-get install python-rosinstall
二.建立工作空间
$ mkdir -p ~/catkin_ws/src $ cd ~/catkin_ws/ $ catkin_make $ source devel/setup.bash $ echo $ROS_PACKAGE_PATH /home/youruser/catkin_ws/src:/opt/ros/indigo/share
参考:
http://blog.csdn.net/u013832707/article/details/53534938
http://www.aiuxian.com/article/p-2598130.html