ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

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

asked 2021-11-10 02:09:42 -0500

Alex2008 gravatar image

updated 2021-11-10 02:28:51 -0500

gvdhoorn gravatar image

When i run the command:

roslaunch turtlebot3_bringup turtlebot3_robot.launch

I get the following message:

Command 'roslaunch' not found, but can be installed with:
sudo apt install python-roslaunch

So I try this command, giving me the following message:

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.

So I try to install python-roslib, using the command:

sudo apt install python-roslib. This gives me the following error: 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.

Does anybody now how I can fix this?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2021-11-10 02:24:43 -0500

gvdhoorn gravatar image

updated 2021-11-10 02:26:07 -0500

You appear to be running into problems trying to mix wiki/UpstreamPackages and regular ROS packages.

Note how all packages you mention don't have the name of the ROS version you're using in them: python-roslaunch, python-roslib and catkin.

In ROS Melodic, the correct package names would be: ros-melodic-roslaunch, ros-melodic-roslib and ros-melodic-catkin.

You cannot mix upstream packages with packages from a ROS release (that's not entirely true, but if you're just starting out, I would probably heed the advice given on the wiki page and not attempt to do so). See the linked wiki page for more information about them, and see “upstream packages” increasingly becoming a problem for a recent-ish discussion.

But your initial problem was:

When i run the command: roslaunch turtlebot3_bringup turtlebot3_robot.launch

I get the following message: Command roslaunch not found, but can be installed with: sudo apt install python-roslaunch

did you perhaps forget to source /opt/ros/melodic/setup.bash (or the equivalent for your workspace) before trying to use roslaunch? If you don't source your ROS installation (or workspace), your shell will not be able to find roslaunch, which on Ubuntu causes it to suggest installing the python-roslaunch package.

edit flag offensive delete link more

Comments

Some related Q&As: #q353082, #q359586, #q390335 and #q356158.

gvdhoorn gravatar image gvdhoorn  ( 2021-11-10 02:26:40 -0500 )edit

Thank you for your clear answer. I wasn't aware of using upstream packages with packages from a ROS release.

Alex2008 gravatar image Alex2008  ( 2021-11-10 03:08:13 -0500 )edit

So the solution would be to not do that.

Have you been able to solve your initial problem?

gvdhoorn gravatar image gvdhoorn  ( 2021-11-10 05:07:26 -0500 )edit

Yes I have been able to solve the problem. Only by using source/opt/ros/melodic/setup.bash the error was fixed. Thanks a lot!

Alex2008 gravatar image Alex2008  ( 2021-11-10 09:54:07 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-11-10 02:09:42 -0500

Seen: 3,251 times

Last updated: Nov 10 '21