eclipse 在我的 Mac 上更改登录密码后,如何修复 JavaHL (JNI) 不可用?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2372419/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 14:28:36  来源:igfitidea点击:

How do I fix JavaHL (JNI) Not available after I have changed the logon password on my Mac?

eclipsesvnmacoseclipse-plugin

提问by INeedHelp

I have installed Eclipse 3.5.2 and the plugin Subversion JavaHL Native Library Adapter 1.6.9.2 and this worked without any problems. However, this morning I was forced to change the password to logon to my Mac and since then I get the message that "Subversion native library not available" when I try to save any changes. Can anyone help? I have tried to add this line (-Djava.library.path=/usr/lib/jni) to the eclipse.ini file but this didn′t seem to make any difference.

我已经安装了 Eclipse 3.5.2 和插件 Subversion JavaHL Native Library Adapter 1.6.9.2,这没有任何问题。但是,今天早上我被迫更改密码以登录我的 Mac,从那时起,当我尝试保存任何更改时,我收到消息“Subversion 本机库不可用”。任何人都可以帮忙吗?我试图将这一行 (-Djava.library.path=/usr/lib/jni) 添加到 eclipse.ini 文件中,但这似乎没有任何区别。

Can anyone help?

任何人都可以帮忙吗?

回答by Raptor

Install MacPortsor HomeBrew, then run the following command:

安装MacPortsHomeBrew,然后运行以下命令:

For MacPorts, the commands to run are:

对于MacPorts,要运行的命令是:

sudo port install subversion-javahlbindings +no_bdb +universal

For HomeBrew, the command is:

对于HomeBrew,命令是:

brew install --universal --java subversion

回答by Mark Bennett

I was having a similar problem on Mac OS X Snow Leopard. I suspect your libraries are there but just need permissions changed, whereas I didn't have the libs at all.

我在 Mac OS X Snow Leopard 上遇到了类似的问题。我怀疑您的库在那里,但只需要更改权限,而我根本没有库。

The directory to check is /opt/subversion/lib, see if it has any libsvnjavahlfiles. In your case they may be there and just need new permissions.

要检查的目录是/opt/subversion/lib,看看它是否有任何libsvnjavahl文件。在您的情况下,他们可能在那里,只需要新的权限。

To get the files I followed the the instructions they give for installing JavaHL on OS X, which is to download and install Open CollabNet. (login required, although it's free)

为了获取文件,我按照他们给出的在 OS X 上安装 JavaHL的说明进行操作,即下载并安装Open CollabNet(需要登录,虽然它是免费的)

Then you just need to update your environment variable in .profile, something like:

然后你只需要在.profile 中更新你的环境变量,比如:

export PATH=.:/opt/subversion/bin:$HOME/bin:$PATH

导出 PATH=.:/opt/subversion/bin:$HOME/bin:$PATH

Then ran:

然后跑:

. .profile

. 。轮廓

Then I tested with javahltests.jaras mentioned here.

然后我用这里提到的javahltests.jar进行了测试。

回答by April Smith

The easiest thing to do is download and install the OSX package that is provided on openCollabNet.

最简单的方法是下载并安装openCollabNet上提供的 OSX 包。

MacPorts also provides an easy Subversion and JavaHL package, however on Snow Leopard ?MacPorts is still compiling these packages as simple 32-bit binaries. If you use the default Snow Leopard JVM which is 64-bit you will get an error...

MacPorts 还提供了一个简单的 Subversion 和 JavaHL 包,但是在 Snow Leopard 上?MacPorts 仍然将这些包编译为简单的 32 位二进制文​​件。如果您使用默认的 64 位 Snow Leopard JVM,则会出现错误...

Failed to load JavaHL Library. These are the errors that were encountered:

无法加载 JavaHL 库。这些是遇到的错误:

no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path /opt/local/lib/libsvnjavahl-1.0.0.0.dylib: no suitable image found. Did find: /opt/local/lib/libsvnjavahl-1.0.0.0.dylib: mach-o, but wrong architecture

java.library.path 中
没有 libsvnjavahl-1 java.library.path 中没有 svnjavahl-1 /opt/local/lib/libsvnjavahl-1.0.0.0.dylib:找不到合适的图像。确实找到了:/opt/local/lib/libsvnjavahl-1.0.0.0.dylib: mach-o,但架构错误

Note the error about wrong architecture. This is because the 64-bit JVM cannot load a 32-bit native library. The ?CollabNet binaries for OSX do not have this problem because they include both 32-bit and 64-bit versions.

请注意有关错误架构的错误。这是因为 64 位 JVM 无法加载 32 位本机库。OSX 的 ?CollabNet 二进制文件没有这个问题,因为它们包括 32 位和 64 位版本。

Source: subclipse.tigris.org

来源:subclipse.tigris.org

回答by mernst

Here is a blog entry that gives a solution: http://blog.mattwoodward.com/getting-rid-of-subversion-native-library-not

这是一个提供解决方案的博客条目:http: //blog.mattwoodward.com/getting-rid-of-subversion-native-library-not

I don't know whether this will work in your particular situation, but it's worth a try.

我不知道这是否适用于您的特定情况,但值得一试。

(Edited to fix link that became broken after I posted. The link became broken sometime between May 3 and June 1.)

(编辑以修复我发布后断开的链接。链接在 5 月 3 日至 6 月 1 日之间的某个时间断开。)

回答by Eduardo

In case you already have subversion installed I'd recommend performing first a brew uninstall and then the install again. And follow the steps to create the links indicated after the install concludes. This worked for me. Regards

如果您已经安装了 subversion,我建议您先执行 brew 卸载,然后再次安装。并按照步骤创建安装结束后指示的链接。这对我有用。问候

回答by Alberto M

I fixed it installing the SVNKit Client Adapter (not required)package.

我修复了它安装SVNKit 客户端适配器(不需要)包。