Ask Your Question
0

Broken ROS Melodic install on Ubuntu 18.04

asked 2019-09-12 09:17:31 -0500

rockiusD gravatar image

updated 2019-09-12 16:27:36 -0500

tfoote gravatar image

I tried installing ROS Melodic on Ubuntu 18.04.2 following these steps: http://wiki.ros.org/melodic/Installat... . When I tried installing packages I got the following error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python-rosdistro-modules : Depends: python-rospkg-modules but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)

If I try running sudo apt --fix-broken install I get the following error:

Preparing to unpack .../python-rospkg-modules_1.1.10-1_all.deb ...
Unpacking python-rospkg-modules (1.1.10-1) ...
dpkg: error processing archive /var/cache/apt/archives/python-rospkg-modules_1.1.10-1_all.deb (--unpack):
 trying to overwrite '/usr/lib/python2.7/dist-packages/rospkg/__init__.py', which is also in package python-rospkg 1.1.4-1
Errors were encountered while processing:
 /var/cache/apt/archives/python-rospkg-modules_1.1.10-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

If a try running sudo apt remove ros-melodic-desktop-full I getan error like the one I get when I try to install a peckage.

How can I fix my install?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-09-12 16:34:22 -0500

tfoote gravatar image

python-rospkg 1.1.4-1 is from upstream Ubuntu while python-rospkg-modules 1.1.10-1 is from packages.ros.org which conflicts with the Ubuntu version. Make sure that you have not pinned that version of python-rospkg or otherwise forced the version dependency resolution or prevented the upgrade.

Conflict is explicitly stated and should be triggered when trying to install via apt

$ apt-cache show python-rospkg-modules
Package: python-rospkg-modules
Priority: optional
Section: python
Installed-Size: 130
Maintainer: Ken Conley <kwc@willowgarage.com>
Architecture: all
Version: 1.1.10-1
Replaces: python-rospkg (<< 1.1.0)
Depends: python-yaml, python:any (<< 2.8), python:any (>= 2.7.5-5~), python-catkin-pkg-modules, lsb-release
Conflicts: python-rospkg (<< 1.1.0)
Filename: pool/main/p/python-rospkg-modules/python-rospkg-modules_1.1.10-1_all.deb
SHA512: 07a5c3fbd0d9e64d14e551afc0776624f988d901f2515394d25d22c39a0036a772855548c60253ecd70be093928ea63f4de2f83d9d95590db6825c52d7453aa5
Size: 23728
SHA256: 566648a492245638a0ccbd56140fec74504a820849c062f6fc5a0018ced5e52b
SHA1: 8ec5d1b6acd8ede75949c24695511878ce356e6d
MD5sum: a1122b3d214bd3869359d5da92542b03
Description: ROS package library
         Library for retrieving information about ROS packages and stacks.
Description-md5: 1f0f66a0136715f5b0d845083b68d081
Homepage: http://wiki.ros.org/rospkg

Modules source

$ apt-cache policy python-rospkg-modules
python-rospkg-modules:
  Installed: 1.1.10-1
  Candidate: 1.1.10-1
  Version table:
 *** 1.1.10-1 500
        500 http://packages.ros.org/ros/ubuntu bionic/main amd64 Packages
        500 http://packages.ros.org/ros/ubuntu bionic/main i386 Packages
        500 http://packages.ros.org/ros2/ubuntu bionic/main amd64 Packages
        500 http://packages.ros.org/ros2/ubuntu bionic/main arm64 Packages
        100 /var/lib/dpkg/status

Executable sources

$ apt-cache policy python-rospkg
python-rospkg:
  Installed: 1.1.10-100
  Candidate: 1.1.10-100
  Version table:
 *** 1.1.10-100 500
        500 http://packages.ros.org/ros/ubuntu bionic/main amd64 Packages
        500 http://packages.ros.org/ros/ubuntu bionic/main i386 Packages
        500 http://packages.ros.org/ros2/ubuntu bionic/main amd64 Packages
        500 http://packages.ros.org/ros2/ubuntu bionic/main arm64 Packages
        100 /var/lib/dpkg/status
     1.1.4-1 500
        500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-09-12 09:17:31 -0500

Seen: 113 times

Last updated: Sep 12