开发者

How to solve "cannot open shared object" problem while opening subprocess within apache

I run a web application in apache. My application try to execute a executable written by QT.

But I always encounter "cannot open shared object libQtWebkit.so: No such file or directory" error.

I can run this executable in shell without any problem. I tried set LD_LIBRARY_PATH but still not working.

How can I set shared library path for apache to make it run this executable?

Thanks!

(Note: for more detail, my web application is written by django which run in mod_wsgi, I try to run my executable file with subproc开发者_StackOverflow社区ess.Popen. This executable is written by QT 4.6.3, located on $HOME/lib/qt (not system installed QT version), I set QTDIR and LD_LIBRARAY_PATH, but not working)


Ok, I did face the same problem and got the solution from http://www.computing.net/answers/linux/error-in-loading-shared-libraries-/16460.html

Say, Apache fails to load xyz.so file. Go to your terminal, and locate it:

locate xyz.so

And say you get as output:

/path/to/xyz.so

Add this path (/path/to) in the /etc/ld.so.conf file. Then run

sudo ldconfig

Now restart Apache server and check.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜