The program roscore is currently not installed

現象說明

打開roscore發現

The program ‘roscore’ is currently not installed. You can install it by typing: sudo apt install python-roslaunch

按照提示:sudo apt install python-roslaunch
喜提如下錯誤:

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:
python-roslaunch : Depends: python-roslib
but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

sudo apt install python-roslib

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: python-roslib :
Depends: catkin but it is not going to be installed E: Unable to
correct problems, you have held broken packages.

再試sudo apt install catkin

Depends: python-catkin-pkg but it is not going to be installed

一條路走到黑sudo apt install python-catkin-pkg Reading package lists…
Done Building dependency tree Reading state information… Done
python-catkin-pkg is already the newest version (0.3.1-1). 0 upgraded,
0 newly installed, 0 to remove and 0 not upgraded.

直到撞了南牆

解決辦法

1、沒有source導致的

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc`
source ~/.bashrc

2、沒有安裝python-roslaunch導致
應該安裝ros-kinetic-roslaunch,而不是python-roslaunch

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