Unmet dependencies: python-catkin-pkg : Conflicts: catkin but 0.7.8-1 is to be installed
I followed the instructions to install ros-melodic-desktop-full
on Ubuntu 18.04 from http://wiki.ros.org/melodic/Installation/Ubuntu. I noticed the command rosbag was not installed which requires installing python-rosbag
.
When I try sudo apt install python-rosbag
, I get the following error:
The following packages have unmet dependencies:
python-catkin-pkg-modules : Conflicts: catkin but 0.7.8-1 is to be installed
python-catkin-pkg : Conflicts: catkin but 0.7.8-1 is to be installed
Running sudo aptitude install python-rosbag
doesn't resolve the issue. No hints either on http://wiki.ros.org/UpstreamPackages. I made sure all repositories are turned on, and 'source /opt/ros/melodic/setup.bash' is at the of my .bashrc.
Does anyone else have any other suggestions?
Thanks in advance
Asked by michago on 2018-10-26 06:16:24 UTC
Answers
I noticed the command rosbag was not installed which requires installing
python-rosbag
.
Actually: no.
The correct package name is ros-$ROS_DISTRO-rosbag
.
python-rosbag
is the "upstream" version, as explained on the Debian Science pages linked from the wiki/UpstreamPackages you already link.
Asked by gvdhoorn on 2018-10-26 07:31:55 UTC
Comments
After uninstalling and installing ROS trying to deal with the issue, now I notice that the command rosbag is present. You're right, ros-melodic-rosbag package must not have been previously installed for some reason. Though python-rosbag won't install, there's no reason to do it as the command I need is present. Thanks a lot to all for your quick responses.
Asked by michago on 2018-10-26 07:52:08 UTC
Comments
Did you also install the
catkin
package separately?ros-melodic-desktop-full
depends onros-melodic-catkin
which depends onpython-catkin-pkg
andpython-catkin-pkg-modules
. The last two conflict withcatkin
. You mention you used aptitude, but it "didn't solve the issue"...Asked by jarvisschultz on 2018-10-26 07:35:59 UTC
I would think that aptitude would be capable of resolving this if you really parsed the options it provides. Regardless, the issue seems to be that you likely installed some packages manually that you shouldn't have and now dependencies can't be automatically installed because they conflict.
Asked by jarvisschultz on 2018-10-26 07:37:59 UTC
Note that
apt-cache depends <PKGNAME>
can tell you dependencies. The--recurse
option will produce recursive dependencies. Also I usually usedpkg -l | grep <PKGNAME>
to search for packages that I do have installed. In that output anything with anii
at the beginning of the line is installedAsked by jarvisschultz on 2018-10-26 07:40:07 UTC
@jarvisschultz: the issue is not with Catkin, but with the
python-rosbag
upstream package trying to bring in conflicting dependencies.Asked by gvdhoorn on 2018-10-26 07:41:19 UTC
Yeah you must be right, and I should have gotten that from him explicitly mentioning he installed that manually.
Asked by jarvisschultz on 2018-10-26 11:29:12 UTC