ros安裝出現依賴問題

http://www.liuxiao.org/2015/10/ros-%E5%9C%A8-ubuntu-14-04-%E7%B3%BB%E7%BB%9F%E4%B8%8A%E5%AE%89%E8%A3%85-ros-indigo/


0、安裝環境:
Ubuntu 14.04.3 LTS

1、配置源:

使用 ROS 官方源:

使用國內鏡像源:

設置Key:

更新安裝包:

升級安裝包(通常情況下不需要這一步):

2、安裝 ROS:
推薦新手安裝 Desktop-Full 版本,其他版本都有一些東西不全。安裝命令如下:

或者直接點擊:
點擊這裏

其他版本安裝方式參見 [1]

3、初始化 rosdep:
使用以下命令初始化 rosdep:

4、環境配置:
爲了方便每次系統重啓時可以自動配置好 ros 相關環境,在 ~/.bashrc 文件末尾增加如下代碼:

或者直接運行以下命令:

運行如下命令使配置生效:

這樣以後每次重啓都可以自動配置好環境了。

5、安裝 rosinstall:
很多常見包都使用 rosinstall 工具,使用如下命令安裝:

到此安裝結束,開始你的ROS之旅吧!

常見問題:
1、64位系統下:Some packages could not be installed. 錯誤
在很多64位機器上如果安裝 ros-indigo-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-indigo-desktop-full : Depends: ros-indigo-desktop 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-desktop 或者可以嘗試先卸載下面的組件:

2、錯誤:default sources list file already exists
在運行 sudo rosdep init 時可能出現如下錯誤:
ERROR: default sources list file already exists:
/etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize

通常這是因爲你之前曾經安裝過 ROS 系統的某個版本,只需按照提示刪除已經存在的初始化文件即可:

然後再重新運行 sudo rosdep init 就沒有問題了。

參考文獻:
[1] http://wiki.ros.org/indigo/Installation/Ubuntu


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章