ros-melodic-ros-controllers-cartesian : Depends: ros-melodic-twist-controller but it is not installed

asked 2021-11-03 06:17:10 -0600

vidu98 gravatar image

updated 2021-11-05 08:06:43 -0600

gvdhoorn gravatar image

When i run sudo apt-get upgrade i receive 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:
 ros-melodic-ros-controllers-cartesian : Depends: ros-melodic-twist-controller but it is not installed
 ros-melodic-twist-controller-dbgsym : Depends: ros-melodic-twist-controller (= 0.1.4-1bionic.20210921.212715) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
edit retag flag offensive close merge delete

Comments

It is not clear what question you are asking.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-11-03 07:19:52 -0600 )edit

When i run sudo apt-get upgrade, i get unmet dependencies error, even after i run "apt --fix-broken install" i get the same error

vidu98 gravatar image vidu98  ( 2021-11-03 07:29:53 -0600 )edit

Have you tried to install the missing dependency? sudo apt install ros-melodic-twist-controller

osilva gravatar image osilva  ( 2021-11-03 07:55:03 -0600 )edit

@osilva i have tried "sudo apt install ros-melodic-twist-controller" it gives the following error

Unpacking ros-melodic-twist-controller (0.1.4-1bionic.20210921.212715) ...
dpkg: error processing archive /var/cache/apt/archives/ros-melodic-twist-controller_0.1.4-1bionic.20210921.212715_amd64.deb (--unpack):
 trying to overwrite '/opt/ros/melodic/lib/libtwist_controller.so', which is also in package ros-melodic-cob-twist-controller 0.8.12-1bionic.20210921.230048
Errors were encountered while processing:
 /var/cache/apt/archives/ros-melodic-twist-controller_0.1.4-1bionic.20210921.212715_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
vidu98 gravatar image vidu98  ( 2021-11-03 08:04:50 -0600 )edit

What's your OS version? What's the output of uname -a? If you have Ubuntu20.04 you shouldn't be installing melodic since that requires 18.04.

Use noetic instead: http://wiki.ros.org/noetic/Installati...

bergercookie gravatar image bergercookie  ( 2021-11-03 10:29:27 -0600 )edit

@bergercookie im using Ubuntu 18.04 LTS (Bionic Beaver)

uname -a
Linux kannan-Lenovo-ideapad-320-15IKB 5.4.0-86-generic #97~18.04.1-Ubuntu SMP Sat Sep 18 03:11:22 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
vidu98 gravatar image vidu98  ( 2021-11-03 12:44:35 -0600 )edit

Those error messages indicate a conflict between the two apt packages ros-melodic-cob-twist-controller and ros-melodic-twist-controller. I would try to purge cob, which hopefully will not remove any packages you actually want to use. Make sure you read and understand the list of packages about to be removed before you confirm the purge.

sudo apt update
sudo apt purge ros-melodic-cob-twist-controller
sudo apt --fix-broken install
Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-11-03 13:45:26 -0600 )edit

@Mike Scheutzow when i try to purge i get 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:
     ros-melodic-cob-cartesian-controller : Depends: ros-melodic-cob-twist-controller but it is not going to be installed
     ros-melodic-cob-twist-controller-dbgsym : Depends: ros-melodic-cob-twist-controller (= 0.8.12-1bionic.20210921.230048) but it is not going to be installed
     ros-melodic-ros-controllers-cartesian : Depends: ros-melodic-twist-controller but it is not going to be installed
     ros-melodic-twist-controller-dbgsym : Depends: ros-melodic-twist-controller (= 0.1.4-1bionic.20210921.212715) but it is not going to be installed
    E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
vidu98 gravatar image vidu98  ( 2021-11-03 13:58:47 -0600 )edit