简体   繁体   中英

Moving a pre-made OpenCV installation to another Linux computer

I installed OpenCV for C++ on Linux by using this guide .

And then made it work with Eclipse with this guide .

However, I need to be able to use OpenCV for a few different Linux computers and this is where I have an issue.

The installation worked fine but it took a lot of time to make the file (over 3 hours) and therefore I would like to skip the installation when moving OpenCV to another Linux computer. I tried to copy over the pre-made OpenCV directory from my first installation to another computer, but when trying to find the OpenCV installation with this commando from the guide:

pkg-config --cflags opencv

I get this error message:

Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found

I just want to make sure before I spend a half a day making OpenCV installations on every computer, is there a way to copy a pre-made OpenCV installation to another computer? It would save me a ton of time. Or do I simply need to follow the installation guide for each and every computer I want to use OpenCV on?

Thanks in advance,

Some of the parts of OpenCV have to be compiled for the specific processor. This means you have to install compile them on the specific machine. I'm assuming cmake is taking the majority of the time. To enhance this process you can add an option -j followed by the number of threads the machine has. For example -j4 for a machine with 4 threads or -j8 for a machine with 8 threads. If you don't know how many threads your machine has you can use the command lscpu to get information about the CPU.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM