如何解决“检测到不一致:dl-lookup.c:111”(Java 结果 127)错误?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/55847497/
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
How do I troubleshoot "Inconsistency detected: dl-lookup.c: 111" (Java Result 127) error?
提问by Hyman
I'm currently trying to build a Java project using Maven for a game I'm working on.
我目前正在尝试使用 Maven 为我正在开发的游戏构建一个 Java 项目。
A recent push to our repository by another user has broken the build for me, but not other users.
最近另一个用户对我们的存储库的推送破坏了我的构建,但其他用户没有。
No changes have been made the to Pom.xml in recent builds and my Java environment has remained consistent.
在最近的构建中没有对 Pom.xml 进行任何更改,并且我的 Java 环境保持一致。
I'm using Java 8 OpenJDK (1.8.0_211) on a Ubuntu 18.04 LTS distribution.
我在 Ubuntu 18.04 LTS 发行版上使用 Java 8 OpenJDK (1.8.0_211)。
The maven repository is able to compile successfully, but when I try to execute the code using our predetermined (mvn integration-test -Pdesktop) build I receive a Build Success, some errors and no application launch.
maven 存储库能够成功编译,但是当我尝试使用我们预先确定的 (mvn integration-test -Pdesktop) 构建执行代码时,我收到构建成功、一些错误并且没有启动应用程序。
I've looked on Linux forums, but have been unable to find similar cases.
我查看了 Linux 论坛,但找不到类似的案例。
Normal Maven Debug options have not provided any initial indication of the problem that I recognise.
正常的 Maven 调试选项没有提供我认识到的问题的任何初步迹象。
I've looked at several Stack Overflow questions including debugging ld, "Inconsistency detected by ld.so"but am unsure where to begin with the comments suggested approaches and if this is viable for my case.
我已经查看了几个堆栈溢出问题,包括 调试 ld、“ld.so 检测到的不一致”,但我不确定从哪里开始评论建议的方法,以及这对我的情况是否可行。
I've looked at the Java Error Code 127, which suggests that a resource cannot be found on my CLASSPATH. Is this correct and how do I identify the missing resource on what seems to be a successful build?
我查看了 Java 错误代码 127,这表明在我的 CLASSPATH 上找不到资源。这是正确的,我如何识别似乎是成功构建的缺失资源?
The error is as follows.
错误如下。
[java] Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!
[java] Java Result: 127
On success, I'm expecting the build to report a success and to launch the Game. On failure, I had expected the build to report a failure, but instead I'm seeing a build success without the launch of the LibGDX application.
成功后,我期待构建报告成功并启动游戏。失败时,我原以为构建会报告失败,但我看到构建成功但未启动 LibGDX 应用程序。
The build is currently running for users on other platforms.
该版本目前正在为其他平台上的用户运行。
回答by snesgx
Downgrade to OpenJDK 8
降级到 OpenJDK 8
I had the same problem in Xubuntu 18.04 with Eclipse 2018-12 (4.10.0). It was working fine, but probably some update in the system (or to OpenJDK specifically) started this problem. In addition Gradle Tasks weren't showing up in the Gradle Window.
我在使用 Eclipse 2018-12 (4.10.0) 的 Xubuntu 18.04 中遇到了同样的问题。它工作正常,但可能是系统中的一些更新(或特别是 OpenJDK)引发了这个问题。此外 Gradle 任务没有显示在 Gradle 窗口中。
I solved the issue removing packages: default-jre, default-jdk, default-jre-headless, default-jdk-headless, all of them are "pointing at" openjdk-11.
我解决了删除包的问题:default-jre、default-jdk、default-jre-headless、default-jdk-headless,所有这些都“指向”openjdk-11。
Then I installed packages: openjdk-8-jre, openjdk-8-jdk, openjdk-8-jre-headless and openjdk-8-jdk-headless.
然后我安装了软件包:openjdk-8-jre、openjdk-8-jdk、openjdk-8-jre-headless 和 openjdk-8-jdk-headless。
Changed eclipse.ini in the vm section to: -vm /usr/lib/jvm/java-8-openjdk-amd64/bin
将 vm 部分中的 eclipse.ini 更改为:-vm /usr/lib/jvm/java-8-openjdk-amd64/bin
And now everything is working fine, and Gradle tasks are showing again. To clarify, I'm also using LibGDX.
现在一切正常,Gradle 任务再次显示。澄清一下,我也在使用 LibGDX。