Ask Your Question
0

How to install OpenCV on Arch

asked 2017-06-13 17:37:59 -0600

Judas gravatar image

updated 2017-06-14 00:23:04 -0600

berak gravatar image

How can I get opencv to work on Arch (Antergos)?

I can install opecv from the extra-repository, but when I use "import cv2" in python I get the error "libhdf5.so.100 cannot open shared object file". Installing the opencv-git from AUR doesn't work because my /tmp folder runs out of space at 9% build proces.

Installing using pip works, but cv2.VideoCapture() doesn't (cap.isOpened() returns false), I read it's because it is not compiled with ffmpeg included.

Is there a solution to my problem?

edit retag flag offensive close merge delete

Comments

how about building from scratch? all your issues seem to be related to the fact that the library is built with stuff not available on your OS...

StevenPuttemans gravatar imageStevenPuttemans ( 2017-06-14 06:42:58 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2017-06-14 17:32:18 -0600

theodore gravatar image

updated 2017-06-14 17:33:35 -0600

@Judas, how do you install the aur package? I guess you are using yaourt or another pacman wrapper, right? As Steven suggested try to compile everything from scratch.

  1. fist download manually the PKGBUILD file from aur
  2. go to the path where you have downloaded the file and decompress it
  3. get into the uzipped folder
  4. open a console in this path
  5. and run the following command makepkg -s and wait for the source code to compile. This will create file, the package, with extention .xz
  6. when it is done in the same path from the console run pacman -U <name_of_package>.xz in order to install the compiled package

this should be quite straight forward. By modifying the PKGBUILD you might want to include more libraries into the package (e.g. Qt, extra_modules, etc).

If you still have issues I would suggest you to write in the official forum of Antegros, since in the Arch forum they answer only to clean Arch installations.

edit flag offensive delete link more
1

answered 2017-06-15 17:40:36 -0600

Judas gravatar image

I build it from scratch yesterday. Never build a package before so I did't now how to start. Apparently CMake gui is already installed on Antergos so I used this method, really easy in fact.

Just choose source and destination directory and: click "configure" -> check parameters -> click "generate" -> use "sudo make install" in the destination folder. I made sure ffmpeg was included and now it's working.

Thank you for the replies!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-06-13 17:37:59 -0600

Seen: 4,354 times

Last updated: Jun 15 '17