Cant compile opencv3 on ubuntu

asked 2016-08-09 22:00:37 -0600

trops gravatar image

Hi guys and gals,

Ive been trying to compiles opencv3 on ubuntu and am hitting this error:

* No rule to make target /usr/include/../lib/libavcodec.a', needed bylib/libopencv_videoio.so.3.1.0'. Stop.

I have ffmpeg installed, and cannot figure out who to get this to work properly. Any ideas?

Thanks, John

edit retag flag offensive close merge delete

Comments

1

you need av dev packages, standalone ffmpeg won't help you.

have a look here: http://docs.opencv.org/master/d7/d9f/...

berak gravatar imageberak ( 2016-08-09 23:36:31 -0600 )edit

Yes, I have installed the required packages and confirmed that they are installed. It seems they aren't linked possibly? Or opencv3 can't find them for some reason.

trops gravatar imagetrops ( 2016-08-10 09:52:46 -0600 )edit

can we see your cmake output ? (append to question , it's rather long)

berak gravatar imageberak ( 2016-08-11 01:40:36 -0600 )edit

I tried to answer my own question but it wouldn't let me, but here is what worked.

The libraries that were "missing" were actually located in the following directory:

/usr/lib/x86_64-linux-gnu/

So I had to execute the following line:

export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig

And then I ran all my installation scripts as usual.

I tried to paste the entire script for installation (that works actually) and the formatting was insane.

Send me a note if you want the script for installing opencv3 with opencv_contrib on ubuntu.

Thanks everyone for your answers!

trops gravatar imagetrops ( 2016-08-11 10:41:52 -0600 )edit