Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install OpenCv 3.1.0 without root permissions ?

I downloaded the OpenCv 3.1.0 package and I would like to install it on Ubuntu 16.04. I am not sudo on my computer and I wanted to know how to install correctly OpenCV locally.


1 Answers

You can install OpenCV to any folder that you have write permission with CMAKE_INSTALL_PREFIX flag, whose default is /usr/local. For example:

mkdir build && cd build
cmake -D CMAKE_INSTALL_PREFIX='/home/username/local' ..
make -j8 && make install

Since header files and libraries are not install in system path, you have to configure your OpenCV projects manually.

like image 145
Quang Hoang Avatar answered Sep 05 '25 14:09

Quang Hoang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!