Eclipse:LD_LIBRARY_PATH,OpenJDK和libjpeg [英] Eclipse: LD_LIBRARY_PATH, OpenJDK and libjpeg
问题描述
LD_LIBRARY_PATH
,因为我使用的库是默认目录,或者我将它们添加到 但是当我使用Eclipse时,我的 ld.conf
code>设置为:
/ usr / lib / jvm / java-6-openjdk / jre / lib / i386 / client:
/ usr / lib / jvm / java-6-openjdk / jre / lib / i386:
/usr/lib/xulrunner-1.9.2.17:
/ usr / lib / xulrunner-1.9.2.17
(添加换行符可读性)
我不介意xulrunner,但OpenJDK导致我的应用程序加载
p / >而不是 /usr/lib/libjpeg.so
这导致后续的失败,因为OpenJDK中的那个是6b,而我正在使用libjpeg 8。
我知道我可以覆盖 LD_LIBRARY_PATH
,同时编译C ++,但一旦我尝试执行链接我刚刚编译的共享库的Python代码,它就会失败。
如何更改此全局 LD_LIBRARY_PATH
?
解决方案您是否从eclipse启动Python?您可以在运行配置>环境选项卡中设置LD_LIBRARY_PATH,因此它会覆盖您看到的默认值。
On my development machine (Linux) I have not set LD_LIBRARY_PATH
at all, as the libraries I'm using are either in default directories or I've added them to ld.conf
.
But when I'm using Eclipse, my LD_LIBRARY_PATH
is set to:
"/usr/lib/jvm/java-6-openjdk/jre/lib/i386/client:
/usr/lib/jvm/java-6-openjdk/jre/lib/i386:
/usr/lib/xulrunner-1.9.2.17:
/usr/lib/xulrunner-1.9.2.17"
(added line breaks for readability).
I don't mind xulrunner ones, but the OpenJDK causes my apps to load
/usr/lib/jvm/java-6-openjdk/jre/lib/i386/libjpeg.so
instead of
/usr/lib/libjpeg.so
Which lead to subsequent fail, as the one from OpenJDK is 6b, while I'm using libjpeg 8.
I know I can override LD_LIBRARY_PATH
while compiling C++, but it fails as soon as I try to execute Python code linking the shared libraries I've just compiled.
How can I change this global LD_LIBRARY_PATH
?
解决方案 Are you launching the Python from eclipse? You can set the LD_LIBRARY_PATH in the Run Configurations>Environment tab, so it overrides whatever you see as the default one.
这篇关于Eclipse:LD_LIBRARY_PATH,OpenJDK和libjpeg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!