apache not being able to load opencv library

asked 2013-03-06 13:55:48 -0500

lovelf gravatar image

updated 2013-03-06 14:00:59 -0500

$myexec="/var/www/html/facedetect/facedetect myimage.jpg" exec($myexec." 2>&1");


"/var/www/html/facedetect/facedetect: error while loading shared libraries: libopencv_calib3d.so.2.4: cannot open shared object file: No such file or directory"

I think this must have to do with user apache not being able to read a source to get through to that library, what would be the approach for apache to be able to get to that library.

Or most likely in which file could I change to an absolute path libopencv_calib3d.so.2.4:

so that it loads form /usr/local/lib/libopencv_calib3d.so.2.4

anyways this might just pop another error for another library, besides I don't know how to appropriately let apache be the owner of that file if that's necessary at all, would check once this gets solved.

edit retag flag offensive close merge delete


considered building static libs / using static linking for your project ?

berak gravatar imageberak ( 2013-03-06 15:21:51 -0500 )edit

Have you checked whether /usr/local/lib is under the apache user's PATH?

awknaust gravatar imageawknaust ( 2013-03-07 10:38:58 -0500 )edit