Possible pitfalls in building/installing to non-standard locations in Linux

asked 2019-10-07 04:46:51 -0500

Martian gravatar image

I've been trying to organize most installed libraries under the Linux /opt folder when possible. It was recommended somewhere due to folder permissions, and it helps to keep everything organized.

I was wondering if there could be any downside to using /opt for OpenCV 4 as well. Any subtle, non-obvious problems?

edit retag flag offensive close merge delete


due to folder permissions

so, you're not root on that box ? if you build dynamic opencv libs, you'll have to run ldconfig on the install / binary folder, which unfortunately again needs root

berak gravatar imageberak ( 2019-10-07 07:17:27 -0500 )edit

Hi Berak, Sure, I can get to the folders via sudo. I believe the original recommendation (re /opt vs /usr) was in regard to consistent permissions thru the folder hierarchy, but I couldn't locate the original article. I'll look again. Part of the motivation was in regard to separation and clutter. The /opt folder seemed a cleaner destination for development-related libs. But given the intricacies of OpenCV, I wasn't sure if install to /opt would invite problems later.

Martian gravatar imageMartian ( 2019-10-07 19:28:29 -0500 )edit

ah, i probably misread it, then.

there are platforms like heroku, where you're not root, and can't install anything

berak gravatar imageberak ( 2019-10-08 00:43:25 -0500 )edit

Understandable. I could have been more clear. Your comments about ldconfig are still helpful, as I don't always get fine nuances of Linux.

Martian gravatar imageMartian ( 2019-10-08 02:05:00 -0500 )edit