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

Broken ROS Melodic install on Ubuntu 18.04

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

rockiusD gravatar image

updated 2022-01-22 16:10:04 -0600

Evgeny 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

2 Answers

Sort by ยป oldest newest most voted
0

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

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
0

answered 2020-01-09 22:50:04 -0600

This Worked for me sudo apt --fix-broken install python-rospkg-modules

edit flag offensive delete link more

Question Tools

2 followers

Stats

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

Seen: 6,256 times

Last updated: Sep 12 '19