Jump to content

libstdc++6 error when trying to run dedicated server on debian 7.8


JohannesMP

Recommended Posts

I'm trying to follow the multiplayer FAQ instructions for setting up a linux multiplayer server on my Debian 7.8 installation, running java 1.8.0_45 (Java SE Runtime Environment).

 

I'm getting the following error message when I'm attempt to run projectzomboid-dedi-server.sh:

Java HotSpot(TM) Server VM warning: ignoring option UseSplitVerifier; support was removed in 8.0Loading RakNet from: /home/games/ProjectZomboid/ProjectZomboid_964/projectzomboidException in thread "main" java.lang.UnsatisfiedLinkError: /home/games/ProjectZomboid/ProjectZomboid_964/projectzomboid/libRakNet32.so: libstdc++.so.6: cannot open shared object file: No such file or directory        at java.lang.ClassLoader$NativeLibrary.load(Native Method)        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855)        at java.lang.Runtime.loadLibrary0(Runtime.java:870)        at java.lang.System.loadLibrary(System.java:1122)        at zombie.core.raknet.RakNetPeerInterface.init(RakNetPeerInterface.java:30)        at zombie.network.GameServer.main(GameServer.java:149)

It claims that it cannot open libstdc++.so.6, and when I run sudo apt-get install libstdc++6 it says that "libstdc++6 is already the newest version."

 

Any tips on how I should proceed, and what I could potentially do to fix this would be much appreciated

Link to comment
Share on other sites

Also, my guess is that you're using a 32bit oracle jvm on 64bit debian and you have the appropriate 32bit libc6 installed but not 32bit libstdc++6

 

So if that's the case either use a 64bit jvm on a 64bit OS or install lib32stdc++6. Without a 64bit jvm you'll probably need other libs as well like libxext6:i386 libXrender1:i386 libXtst6:i386 and maybe libxi6:i386 which involves enabling multiarch support and probably pinning jessie or sid libc6 and, yeah, 64bit jvm it is.)

Link to comment
Share on other sites

Yeah, that seems to be right; 64 bit debian with 32bit jvm:

$ uname -aLinux phoenix 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u1 x86_64 GNU/Linux$ ldd /home/games/ProjectZomboid/ProjectZomboid_964/projectzomboid/libRakNet32.so	linux-gate.so.1 (0xf7743000)	libstdc++.so.6 => not found	libm.so.6 => /lib32/libm.so.6 (0xf7585000)	libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7568000)	libc.so.6 => /lib32/libc.so.6 (0xf73be000)	/lib/ld-linux.so.2 (0xf7744000)

When I try to install lib32stdc++6 I seem to get some dependency issues:

$ sudo aptitude install lib32stdc++6The following NEW packages will be installed:  gcc-4.7-base{a} lib32stdc++6 0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.Need to get 491 kB of archives. After unpacking 1,394 kB will be used.The following packages have unmet dependencies: gcc-5-base : Breaks: gcc-4.7-base (< 4.7.3) but 4.7.2-5 is to be installed. gcc-4.9-base : Breaks: gcc-4.7-base (< 4.7.3) but 4.7.2-5 is to be installed.The following actions will resolve these dependencies:     Keep the following packages at their current version:1)     gcc-4.7-base [Not Installed]                       2)     lib32stdc++6 [Not Installed]                       Accept this solution? [Y/n/q/?]

I'm not super familiar with linux so I'm not sure what to do in this case. Would it be easiest to instal the 64 bit jvm, and use that with project zomboid? If so, is it possible to install both and refer to one or the other explicitly? I have some other applications (Atlassian's Jira/Bamboo/Confluence) that I believe rely on the 32 bit jvm so I am cautious in just replacing the 32 bit outright.

Link to comment
Share on other sites

Yeah, the easiest (and best) solution is to install a 64bit jvm. You can certainly have multiple JVMs on the same machine.

 

Typically the current system JVM is managed with update-alternatives

If you look at > which java then it's likely in /usr/bin/java but that is probably just a symlink to /etc/alternatives/java which is itself a symlink to the location of the currently set system jvm via update-alternatives ( something like /usr/lib/jvm/jdk{version}/bin/java )

 

So you can go ahead and install another JVM (openjdk or oracle, it doesn't really matter though 1.7 is the target java version for Project Zomboid.)

If for whatever reason your default jvm gets unset from the current oracle 32bit then you can probably do sudo update-alternatives --config java to bring up a dialog and change it back.

 

Anyway, once you have a second jvm installed you can edit projectzomboid-dedi-server.sh to point directly to that instead of using the java in path.

Or, optionally, you could do something like:

sudo update-alternatives --install "/usr/bin/java64" "java64" "/usr/lib/jvm/jdk1.7.0/bin/java" 1

where jdk1.7.0 is an example path and then edit projectzomboid-dedi-server.sh

XMODIFIERS= java \

to

XMODIFIERS= java64 \

Also, you might want to rename projectzomboid-dedi-server.sh or make a copy and then run off of that because if it gets updated I think it'll reset your changes.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...