Rosanswers logo

No way to install ROS Kinetic with OpenCV in RPi4, I followed the official guide, from a fresh install, with swap, with -j1,-j2... Did somebody get install Kinetic with openCV? i got install OpenCV 4.1 sucessfully, but I cannot with the Kinetic version. To ROS Kinetic recognize OpenCV 4.1 or any standalone version is crezy difficult get it if you are not mastered in Linux and there is not a specific guide for RPi4 or 3 at least I couldnt find it.

make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:63: modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8425: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
<== Failed to process package 'opencv3': 
Command '['/opt/ros/kinetic/env.sh', 'make', '-j1']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/pi/ros_catkin_ws/build_isolated/opencv3 && /opt/ros/kinetic/env.sh make -j1

Command failed, exiting.

in some place I read a similar issue by lack of memory, my rpi4 is 4Gb plus 4Gb partition in a SSD and I even built with -j1

Edit: thank you by the advice, Im new in all this. I tried install ROS robot to avoid OpenCV installation but either received another error.

==> Processing catkin package: 'rospack'
==> Building with env: '/opt/ros/kinetic/env.sh'
Makefile exists, skipping explicit cmake invocation...
==> make cmake_check_build_system in '/home/pi/ros_catkin_ws/build_isolated/rospack'
==> make -j4 -l4 in '/home/pi/ros_catkin_ws/build_isolated/rospack'
[ 33%] Building CXX object CMakeFiles/rospack.dir/src/rospack_cmdline.cpp.o
[ 33%] Building CXX object CMakeFiles/rospack.dir/src/rospack_backcompat.cpp.o
[ 33%] Building CXX object CMakeFiles/rospack.dir/src/rospack.cpp.o
[ 44%] Building CXX object CMakeFiles/rospack.dir/src/utils.cpp.o
In file included from /home/pi/ros_catkin_ws/src/rospack/src/rospack.cpp:28:
/home/pi/ros_catkin_ws/src/rospack/include/rospack/rospack.h:108:10: fatal error: boost/tr1/unordered_set.hpp: No such file or directory
 #include <boost/tr1/unordered_set.hpp>

Originally posted by FPSychotic on ROS Answers with karma: 13 on 2019-07-11

Post score: 1

Original comments

Comment by gvdhoorn on 2019-07-11:
You've copied only the final summary of the errors, but not the error message itself.

Without the actual error message, there is no way anyone here can help you.

And as always with C/C++ errors: copy the first error. The rest is almost always unimportant.

Comment by FPSychotic on 2019-07-12:
I changed the version of libboost1.x to one older I dont know if it will work

Comment by FPSychotic on 2019-07-12:
alright, I tested with a older version of libboost and error again So there is two big issues that make impossible install ROS in RPi4,

Comment by duck-development on 2019-07-12:
Did you try to install melodic? why do you need kinetic?


1 Answer 1


Rosanswers logo

So there is two big issues that make impossible install ROS in RPi4,

I believe the issue is more that you're trying to build a version of ROS on a platform that is not officially supported, with versions of dependencies that are not supported (by Kinetic at least).

ros/rospack#92 seems to be your exact issue.

The problem appears to be that you are attempting to build ROS Kinetic on an unsupported platform. Kinetic is only supported on (from REP 3: Target Platforms - Kinetic Kame (May 2016 - May 2021)):

Required Support for:

  • Ubuntu Wily (15.10)
  • Ubuntu Xenial (16.04)

Recommended Support for:

  • Debian Jessie

And with Boost version 1.55. Anything else is not explicitly supported.

The comments on ros/rospack#92 seem to suggest that the Kinetic version of rospack (and probably other packages) depend on the tr1 headers. Newer versions no longer require them (ros/rospack#80).

If you have the option, I would suggest you try to build Melodic from source, as that should be compatible with Boost 1.65.

There is still no guarantee though, as Melodic is not officially supported on Raspbian.

Originally posted by gvdhoorn with karma: 86574 on 2019-07-12

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by FPSychotic on 2019-07-12:
Thank you by the answer, I tried istall kinetic because the official tutorial tell it. Im going to try melodic tomorrow, and for the moment Im foing to live it open. Your answer have sense for me, and thank you by explain so good.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.