Minecraft doesn't start (missing liblwjgl.so)

I’m running NixOS unstable. I’ve got minecraft in my environment.systemPackages. I was able to start the launcher and install Minecraft Java version, but when I try to start the game from the launcher, it fails to start and a “Game crashed” message is displayed in the launcher along with “Exit code: 0”.

Looking at the logs I see following:

[06:57:56] [main/INFO]: Building optimized datafixer
[06:57:57] [Render thread/INFO]: [STDERR]: [LWJGL] Failed to load a library. Possible solutions:
	a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
	b) Add the JAR that contains the shared library to the classpath.
[06:57:57] [Render thread/INFO]: [STDERR]: [LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
[06:57:57] [Render thread/INFO]: [STDERR]: [LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.
[06:57:58] [Render thread/INFO]: [STDERR]: java.lang.NoClassDefFoundError: Could not initialize class com.mojang.blaze3d.systems.RenderSystem
[06:57:58] [Render thread/INFO]: [STDERR]: 	at z.a(SourceFile:66)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at ejf.a(SourceFile:2408)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at ejf.a(SourceFile:2403)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at net.minecraft.client.main.Main.a(SourceFile:214)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at net.minecraft.client.main.Main.main(SourceFile:51)
[06:57:58] [Render thread/INFO]: [STDERR]: Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: Failed to locate library: liblwjgl.so [in thread "Render thread"]
[06:57:58] [Render thread/INFO]: [STDERR]: 	at org.lwjgl.system.Library.loadSystem(Library.java:164)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at org.lwjgl.system.Library.loadSystem(Library.java:63)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at org.lwjgl.system.Library.<clinit>(Library.java:51)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at org.lwjgl.system.MemoryUtil.<clinit>(MemoryUtil.java:100)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at edb.<clinit>(SourceFile:8)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at edy.<init>(SourceFile:51)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at eef.<init>(SourceFile:19)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at eef.<init>(SourceFile:23)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at eef.<clinit>(SourceFile:11)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at com.mojang.blaze3d.systems.RenderSystem.<clinit>(SourceFile:46)
[06:57:58] [Render thread/INFO]: [STDERR]: 	at net.minecraft.client.main.Main.a(SourceFile:202)
[06:57:58] [Render thread/INFO]: [STDERR]: 	... 1 more

Plz halp!

@cpages @ryantm @Infinisil

This isn’t a direct answer to your question, but lately I’ve been using prismlauncher to start and manage the Minecraft client.



Hey that worked great! And prismlauncher looks to be much more capable. Thanks for your response!

1 Like

One warning, if you are using NixOS. When you upgrade prismlauncher such that it is using a new version of Java, it breaks the client because it stores a path to Java in the nix store. You can go into the settings and say you want to use a custom Java location, then change it back and it will find the new one.

1 Like

Wouldn’t this only be an issue if you then GC’d (which is, of course, still an issue that we should see if we can patch/work with upstream to fix, but I’m just curious)?

Yes, you’re right, you also need to garbage collect to trigger the problem.