ros-infrastructure / catkin_pkg

Standalone Python library for the catkin build system.
https://github.com/ros/catkin
Other
47 stars 89 forks source link

dpkg: error processing archive /var/cache/apt/archives/python3-catkin-pkg-modules_0.4.23-1_all.deb (--unpack): #298

Closed denisgolius closed 3 years ago

denisgolius commented 3 years ago
dengolius@ryzen:/tmp$ sudo apt install python3-argcomplete
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-crystal-ament-cmake-core : Depends: python3-catkin-pkg-modules but it is not going to be installed
 ros-crystal-ros2pkg : Depends: python3-catkin-pkg-modules but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
dengolius@ryzen:/tmp$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  python3-catkin-pkg-modules
The following NEW packages will be installed:
  python3-catkin-pkg-modules
0 upgraded, 1 newly installed, 0 to remove and 11 not upgraded.
188 not fully installed or removed.
Need to get 0 B/42,3 kB of archives.
After this operation, 254 kB of additional disk space will be used.
Do you want to continue? [Y/n] ^C
dengolius@ryzen:/tmp$ sudo apt purge ros-crystal-ament-cmake-core ros-crystal-ros2pkg
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-crystal-ament-cmake : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-cmake-cppcheck : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-cmake-export-definitions : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-cmake-export-dependencies : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-cmake-export-include-directories : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-cmake-export-interfaces : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-cmake-export-libraries : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-cmake-export-link-flags : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-cmake-include-directories : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-cmake-libraries : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-cmake-pytest : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-cmake-python : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-cmake-target-dependencies : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-cmake-test : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-lint-auto : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ament-lint-common : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-ros-core : Depends: ros-crystal-ros2pkg but it is not going to be installed
 ros-crystal-ros2launch : Depends: ros-crystal-ros2pkg but it is not going to be installed
 ros-crystal-ros2run : Depends: ros-crystal-ros2pkg but it is not going to be installed
 ros-crystal-rosidl-default-generators : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-rosidl-typesupport-c : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
 ros-crystal-rosidl-typesupport-cpp : Depends: ros-crystal-ament-cmake-core but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
dengolius@ryzen:/tmp$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  python3-catkin-pkg-modules
The following NEW packages will be installed:
  python3-catkin-pkg-modules
0 upgraded, 1 newly installed, 0 to remove and 11 not upgraded.
188 not fully installed or removed.
Need to get 0 B/42,3 kB of archives.
After this operation, 254 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 355408 files and directories currently installed.)
Preparing to unpack .../python3-catkin-pkg-modules_0.4.23-1_all.deb ...
Unpacking python3-catkin-pkg-modules (0.4.23-1) ...
dpkg: error processing archive /var/cache/apt/archives/python3-catkin-pkg-modules_0.4.23-1_all.deb (--unpack):
 trying to overwrite '/usr/lib/python3/dist-packages/catkin_pkg/__init__.py', which is also in package python3-catkin-pkg 0.3.9-1
Errors were encountered while processing:
 /var/cache/apt/archives/python3-catkin-pkg-modules_0.4.23-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried to install ros from this link https://index.ros.org/doc/ros2/Installation/Crystal/Linux-Install-Debians/

dirk-thomas commented 3 years ago

You have installed python3-catkin-pkg from the Ubuntu repositories (https://packages.ubuntu.com/bionic/python3-catkin-pkg) which collides with python3-catkin-pkg-modules from the ROS repositories. Please see http://wiki.ros.org/UpstreamPackages for a detailed description of the problem.

You need to uninstall the upstream packages in order to use the packages from the ROS repos: for this specific package sudo apt purge python3-catkin-pkg.