我最近删除了我的 java-8 JDK 并通过
brew
. 我sbt
立即运行,并收到以下可怕的错误:
java.lang.UnsatisfiedLinkError:
/private/var/folders/_t/7zfk8lp14mx1b735xv1dkkt00000gp/T/jna-
674908859/jna13937388295933725976.tmp:
dlopen(/private/var/folders/_t/7zfk8lp14mx1b735xv1dkkt00000gp/T/jna-674908859/jna13937388295933725976.tmp, 1): no suitable image found. Did find:
[error]
/private/var/folders/_t/7zfk8lp14mx1b735xv1dkkt00000gp/T/jna-
674908859/jna13937388295933725976.tmp: code signature in
(/private/var/folders/_t/7zfk8lp14mx1b735xv1dkkt00000gp/T/jna-
674908859/jna13937388295933725976.tmp) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
经过一番研究,我发现最接近的问题是:
JNA UnsatisfiedLinkError - 当我将 java.library.path 设置为虚假值时有效
这表明我的机器上可能存在旧版本的 jna。我在我的计算机上对jna.jar
应该存在的文件进行了 grep,但什么也没找到。
我还怀疑可能有一个剩余env
变量链接到一些旧的 java-8 目录,但在printenv
. 任何帮助将不胜感激,谢谢!