Rashik
Rashik

Reputation: 1144

ros kinetic install Failed to process package 'opencv3'

I am installing ros-kinetic on arch following these instructions: https://gist.github.com/lcpz/0ab75aa5205504ced9f5c11cac10a89e

Everything was fine until step 9 where I got the following error:

make: *** [Makefile:163: all] Error 2
<== Failed to process package 'opencv3': 
  Command '['/opt/ros/kinetic/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2

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

Why did that happen?

Upvotes: 0

Views: 3304

Answers (1)

Sandi Baressi Šegota
Sandi Baressi Šegota

Reputation: 83

Check if all prerequisites are installed first:

sudo apt install build-essential
sudo apt install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

Of course, adjust the commands for your system(I'm unfamiliar with pacman).

After that, if it doesn't solve an issue try running make without "-j" option - it can, in rare cases, cause issues especially when you're building dependencies for packages you're building in the same build.

If that doesn't work, try installing OpenCV separately and check if you can get it installed that way. It's possible that a library is failing to link or something - it will probably be clearer if you get the same error separately from entire ROS build. Installation instructions for OpenCV can be found here: https://docs.opencv.org/3.0-beta/doc/tutorials/introduction/linux_install/linux_install.html

Upvotes: 1

Related Questions