如何解决“无法打开共享对象”的问题在apache中打开子进程时出现问题

发布于 2024-09-24 03:25:21 字数 401 浏览 0 评论 0原文

我在 apache 中运行一个 Web 应用程序。 我的应用程序尝试执行 QT 编写的可执行文件。

但我总是遇到“无法打开共享对象libQtWebkit.so:没有这样的文件或目录”错误。

我可以在 shell 中运行这个可执行文件,没有任何问题。 我尝试设置 LD_LIBRARY_PATH 但仍然不起作用。

如何设置 apache 的共享库路径以使其运行此可执行文件?

谢谢!

(注意:有关更多详细信息,我的Web应用程序是由django编写的,它在mod_wsgi中运行,我尝试使用subprocess.Popen运行我的可执行文件。这个可执行文件是由QT 4.6.3编写的,位于$HOME/lib/qt(不是系统安装的QT版本),我设置了QTDIR和LD_LIBRARAY_PATH,但不起作用)

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 subprocess.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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

π浅易 2024-10-01 03:25:21

好吧,我确实遇到了同样的问题,并从 http://www.computing.net/answers/linux/error-in-loading-shared-libraries-/16460.html

比如说,Apache 无法加载 xyz.so 文件。转到您的终端,找到它:

locate xyz.so

并假设您得到输出:

/path/to/xyz.so

/etc/ld.so.conf 文件中添加此路径 (/path/to) 。然后运行

sudo ldconfig

​​Now 重新启动 Apache 服务器并检查。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文