破解Java Mac 10.6 [英] Broken Java Mac 10.6

查看:118
本文介绍了破解Java Mac 10.6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一些背景:

在使用Macports的Mac OS X 10.6上,我在.bash_profile中设置了 DYLD_LIBRARY_PATH

On Mac OS X 10.6 using Macports and I have DYLD_LIBRARY_PATH set in my .bash_profile.

问题:

当我运行 java -version 我收到此错误:

When I run java -version I get this error:


VM初始化期间发生错误

无法加载本机库:libjava .jnilib

Error occurred during initialization of VM
Unable to load native library: libjava.jnilib

通过一个有用的论坛帖子,我发现问题是我的'/ opt / local / lib'目录中的一些文件由于 DYLD_LIBRARY_PATH而导致问题/ code>我已设置。

By way of one helpful forum thread, I've discovered the problem is some files in my '/opt/local/lib' directory are causing trouble because of the DYLD_LIBRARY_PATH I've set.

当我从'/ opt / local / lib'中删除以libgif,libjpeg,libpng和libtiff开头的文件时,问题消失了,`java -version'可以工作,但依赖这些文件的端口会破坏。

When I remove the files starting with libgif, libjpeg, libpng and libtiff from '/opt/local/lib', the problem goes away and `java -version' works, but the ports that depend on those files break.

任何人都知道我可以保留文件的方式仍然可以获得java到 好好工作?可能设置java路径,我不太确定该怎么办,我的所有尝试都失败了。

Anyone know of a way I can keep the files and still get java to work properly? Possibly setting the java path, which I'm not quite sure how to do and all my attempts have failed.

谢谢。

推荐答案

不要设置 DYLD_LIBRARY_PATH 。由于这个env var,动态链接器dyld正在寻找 /opt/local/lib/libjpeg.dylib 等而不是不同的 / System /Library/Frameworks//ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Resources/libJPEG.dylib 它需要它。

Don't set DYLD_LIBRARY_PATH. Because of this env var, the dynamic linker dyld, is finding /opt/local/lib/libjpeg.dylib etc. instead of the different /System/Library/Frameworks//ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Resources/libJPEG.dylib that it needs.

这篇关于破解Java Mac 10.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆