Ask Your Question
0

Catkin Package Dependencies Issue When Installing ROS Melodic on Raspberry Pi 4

asked 2020-02-05 10:43:14 -0600

terrylboro gravatar image

I was trying to install ROS Melodic on the Raspberry Pi 4 according to the instructions here:

link text

and I got this error when building the catkin packages:

[ 89%] Built target qt_gui_cpp
[ 89%] Running SIP generator for qt_gui_cpp_sip Python bindings...
Traceback (most recent call last):
  File "/opt/ros/melodic/share/python_qt_binding/cmake/sip_configure.py", line 85, in <module>
    sip_dir, sip_flags = get_sip_dir_flags(config)
  File "/opt/ros/melodic/share/python_qt_binding/cmake/sip_configure.py", line 65, in get_sip_dir_flags
    raise FileNotFoundError('The sip directory for PyQt5 could not be located. Please ensure' +
NameError: global name 'FileNotFoundError' is not defined
make[2]: *** [src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/build.make:90: sip/qt_gui_cpp_sip/Makefile] Error 1
make[1]: *** [CMakeFiles/Makefile2:566: src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

which was exactly the same as the issue here:

link text

I followed the advice to install the required dependencies using this command:

rosdep install --from-paths src --ignore-src --rosdistro melodic -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 rti-connext-dds-5.3.1 urdfdom_headers"

however I received this error message:

executing command [sudo -H apt-get install -y python-lxml]
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-catkin-pkg-modules but it is not going to be installed
 python-rospkg-modules : Depends: python-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).
ERROR: the following rosdeps failed to install
  apt: command [sudo -H apt-get install -y python-lxml] failed

I ran

sudo apt --fix-broken install

and got this error message:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  vlc-l10n vlc-plugin-notify vlc-plugin-samba vlc-plugin-video-splitter
  vlc-plugin-visualization
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  python-catkin-pkg-modules
The following NEW packages will be installed:
  python-catkin-pkg-modules
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
7 not fully installed or removed.
    Need to get 0 B/41.7 kB of archives.
    After this operation, 252 kB of addi
tional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 203997 files and directories currently installed.)
    Preparing to unpack .../python-catkin-pkg-modules_0.4.16-1_all.deb ...
    Unpacking python-catkin-pkg-modules (0.4.16-1) ...
    dpkg: error processing archive /var/cache/apt/archives/python-catkin-pkg-modules_0.4.16-1_all.deb (--unpack):
     trying to overwrite '/usr/lib/python2.7/dist-packages/catkin_pkg/__init__.py', which is also in package python-catkin-pkg 0.4.10-1
    Errors were encountered while processing:

 /var/cache/apt/archives/python-catkin-pkg-modules_0.4.16-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

If I'm right it looks like these two packages are incompatible, however I'm unsure how to go about solving this issue. Thanks for any help!

edit retag flag offensive close merge delete

Comments

I'm confused: you've tagged this melodic, link to an install tutorial for ROS Melodic on RPi, but then show a rosdep invocation which mentions all sorts of ROS 2 (supporting) packages.

Could you clarify what it is you really want to do? Install ROS 1, or ROS 2?

gvdhoorn gravatar imagegvdhoorn ( 2020-02-05 12:49:57 -0600 )edit

Sorry, I'm just trying to follow the tutorial for installing ROS Melodic on RPi- the advice given on the StackOverflow link
link text mentioned trying this link text which appears to be for ROS2 so that's where the ROS2 packages have come from

terrylboro gravatar imageterrylboro ( 2020-02-05 13:34:07 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-02-09 11:24:34 -0600

terrylboro gravatar image

I finally worked it out - I ran:

sudo apt-get purge python-ros* python-catkin*

which got rid of the conflicting packages. I then went through the installation process again, but didn't run

sudo apt-get autoremove

after running

rosdep install --from-paths src --ignore-src --rosdistro melodic -y

and no longer had that error. Thanks for all the help!

edit flag offensive delete link more
0

answered 2020-02-06 05:03:51 -0600

marguedas gravatar image

updated 2020-02-06 05:07:40 -0600

I faced a similar issue recently when running apt upgrade on a RaspberryPi 2 running Raspbian Buster. What worked for me was to remove the conflicting packages by hand and run apt --fix-broken after

sudo apt remove python-rospkg
sudo apt remove python-catkin-pkg
sudo apt --fix-broken install

Edit: I didnt face the SIP issues in my setup.

rosdep install --from-paths src --ignore-src --rosdistro melodic -y

installed all the dependencies successfully including these sip packages: python-sip python-sip-dev sip-dev

edit flag offensive delete link more

Comments

Attempting to remove the conflicting packages by hand resulted in a similar 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-rosdep : Depends: python-rospkg but it is not going to be installed
 python-rosdep-modules : Depends: python-rospkg (>= 1.1.10) but it is not going to be installed
 python-rosdistro-modules : Depends: python-catkin-pkg-modules but it is not going to be installed
 python-rosinstall : Depends: python-rospkg but it is not going to be installed
 python-rosinstall-generator : Depends: python-rospkg but it is not going to be installed
 python-rospkg-modules : Depends: python-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).
terrylboro gravatar imageterrylboro ( 2020-02-06 16:18:24 -0600 )edit

Also

rosdep install --from-paths src --ignore-src --rosdistro melodic -y

gives the same error

pi@raspberrypi:~/ros_catkin_ws $ rosdep install --from-paths src --ignore-src --rosdistro melodic -y
executing command [sudo -H apt-get install -y python-lxml]
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-catkin-pkg-modules but it is not going to be installed
 python-rospkg-modules : Depends: python-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).
ERROR: the following rosdeps failed to install
  apt: command [sudo -H apt-get install -y python-lxml] failed
terrylboro gravatar imageterrylboro ( 2020-02-06 16:33:27 -0600 )edit

Yeah until you have successfully fixed the broken dependencies you won't be able to install more packages. So rodep install [...] will not work until then

Attempting to remove the conflicting packages by hand resulted in a similar error:

Weird, so neither sudo apt --fix-broken install nor sudo apt remove <pkg_name> works...

I guess you could try to force the removal using sudo dpkg --remove --force-remove-reinstreq python-catkin-pkg. But it's guesswork at this point as the previous steps fixed the issue for me

marguedas gravatar imagemarguedas ( 2020-02-06 17:00:03 -0600 )edit

Unfortunately this gave me the same error - I'll try deleting all of the ROS installation packages and give it another go from scratch...

terrylboro gravatar imageterrylboro ( 2020-02-07 09:21:31 -0600 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2020-02-05 10:43:14 -0600

Seen: 40 times

Last updated: Feb 09