Catkin Package Dependencies Issue When Installing ROS Melodic on Raspberry Pi 4
I was trying to install ROS Melodic on the Raspberry Pi 4 according to the instructions here:
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:
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!
I'm confused: you've tagged this
melodic
, link to an install tutorial for ROS Melodic on RPi, but then show arosdep
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?
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