Error when launching Minecraft on Ubuntu Mate on Raspberry pi 3

Hi, I am trying to install Minecraft Java edition/PC edition on my raspberry pi 3 using Ubuntu Mate. I used this command " sudo apt-get install minecraft-launcher " and it appeared in my games section. I knew I needed a PPA so I got " sudo add-apt-repository ppa:minecraft-installer-peeps/minecraft-installer " and this PPA " sudo add-apt-repository ppa:flexiondotorg/minecraft " I even got Java 8 by using these commands " sudo apt-add-repository ppa:webupd8team/java " sudo apt-get install oracle-java8-installer "
and yes I did " sudo apt-get update " in the process.

Then the error when I launch Minecraft 1.12.2

Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
Java HotSpot(TM) Client VM warning: You have loaded library /home/commandery11/.minecraft/versions/1.12.2/1.12.2-natives-16201058413767/liblwjgl64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/commandery11/.minecraft/versions/1.12.2/1.12.2-natives-16201058413767/liblwjgl.so: /home/commandery11/.minecraft/versions/1.12.2/1.12.2-natives-16201058413767/liblwjgl.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at org.lwjgl.Sys$1.run(Sys.java:72)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
	at org.lwjgl.Sys.loadLibrary(Sys.java:96)
	at org.lwjgl.Sys.<clinit>(Sys.java:117)
	at bib.I(SourceFile:2825)
	at net.minecraft.client.main.Main.main(SourceFile:38)

My username is COMMANDERY11 so I don’t have any special characters in my username. I am sure the raspberry pi can handle Minecraft because I have gotten it on raspbian before it was 1.8.9. I still don’t know why 1.12.2 does not work when I was on raspbian. When I get Optifine I think Minecraft will be pretty playable. Any answer is very appreatated.

/home/commandery11/.minecraft/versions/1.12.2/1.12.2-natives-16201058413767/liblwjgl.so: cannot open shared object file: No such file or directory (Possible cause: can’t load IA 32-bit .so on a ARM-bit platform)

Looks like the liblwjgl lib bundled with the game is only available as a 32-bit x86 one, not an ARM one.

I’m not sure you can start the “PC” version of Minecraft on a Pi at all. In any case, you’d have to find the ARM version of all the libs it uses. I guess you’ll have to use the special Raspberry Pi Edition but I have no idea if it’s at the same level of functionalities as the regular version.

BTW, the two PPA you’ve added don’t provide ARM packages either, they’re completely useless for you, you can remove them.

1 Like

Do u know any PPAs that are compatible with ARM packages? How I got it on Raspbian is at this link

Is it possible for me to use this same tutorial for Ubuntu Mate in some way?

You can try. First thing to check is if the OpenGL driver is in the Ubuntu MATE ARM repos (I don’t know if it uses the Raspbian repos or only its own ones, in which case they might not be up to date). That’s the only part that could be different between Raspbian and Ubuntu MATE.

To be sure, you can try the following on your Pi:

apt-cache policy xcompmgr libgl1-mesa-dri libalut0 libalut-dev mesa-utils

For each one, you’ll see if there is a “candidate” version. If that’s the case, it means that the packages are in the repos. If not, either they’re missing or they have a different name (but I doubt that Ubuntu would repack packages related to Mesa with a different name).

The author of the article is providing ARM versions of the missing libs. Note that they’re on a Dropbox account and the article is getting a bit old, so check if he hasn’t removed them in the meantime. If they’re not available anymore, I assume that they’re free/opensource and could be compiled from source but it might not be the easiest thing to do, especially if you’re not familiar with this.

I don’t know of a Minecraft PPA with ARM builds but it doesn’t really matter: the only point of the PPA is to install Minecraft easily but it doesn’t do anything special apart from checking that Java is installed, downloading the .jar and providing a launcher. If you manage to install the game manually, it’s easy to make your own launcher afterwards.

1 Like

Ok thanks, but when do I do the command u sent me in the tutorial. After what command in the tutorial do I do this command.

The one I gave? Before the tutorial. It’s just to check that the packages for the OpenGL driver (which you install at the beginning of the tutorial) are indeed in the Ubuntu MATE repos and thus can be installed.

If they are, you should be able to follow the tutorial exactly as on Raspbian.

1 Like

So I did the command u gave me. It gave me this.

xcompmgr:
  Installed: 1.1.7-1
  Candidate: 1.1.7-1
  Version table:
 *** 1.1.7-1 500
        500 ttp://ports.ubuntu.com xenial/universe armhf Packages
        100 /var/lib/dpkg/status
libgl1-mesa-dri:
  Installed: 17.2.4-0ubuntu1~16.04.2
  Candidate: 17.2.4-0ubuntu1~16.04.2
  Version table:
 *** 17.2.4-0ubuntu1~16.04.2 500
        500 ttp://ports.ubuntu.com xenial-updates/main armhf Packages
        100 /var/lib/dpkg/status
     11.2.0-1ubuntu2 500
        500 ttp://ports.ubuntu.com xenial/main armhf Packages
libalut0:
  Installed: 1.1.0-5
  Candidate: 1.1.0-5
  Version table:
 *** 1.1.0-5 500
        500 http://ports.ubuntu.com xenial/universe armhf Packages
        100 /var/lib/dpkg/status
libalut-dev:
  Installed: 1.1.0-5
  Candidate: 1.1.0-5
  Version table:
 *** 1.1.0-5 500       This mistake were u see ttp i did that so it can be two links i have to much links for the post its rlly http
        500 ttp://ports.ubuntu.com xenial/universe armhf Packages
        100 /var/lib/dpkg/status
mesa-utils:
  Installed: 8.3.0-1
  Candidate: 8.3.0-1
  Version table:
 *** 8.3.0-1 500
        500 ttp://ports.ubuntu.com xenial/universe armhf Packages
        100 /var/lib/dpkg/status

I think this is good so I went on. BTW xcompmgr was not installed when I did this command. I did this command to copy and paste after I did the tutorial just to let u know. Everything was good so far. Than on the last command to run Minecraft [ ./run.sh ] It gave me this.

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   436  100   271  100   165    384    233 --:--:-- --:--:-- --:--:--   384
todays access token = 62ba4e9a6fa44e48b7c218ce92e2c454
./run.sh: 43: ./run.sh: /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/bin/java: not found

I also formatted my sd card so I can try another linux. Now I have a fresh install of Ubuntu Mate now I did not install java 8 or minecraft installer. I did what the tutorial said to install minecraft a diff way. I have done this tutorial before on Ubuntu Mate before with java 8. I have gotton java 8 a diff way back then. Here is the link.

What im trying to say is when I done this before I had java and it gave me this same error.

/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/bin/java: not found

I dont know if i got the wrong java or not and here is the link for how I got java before. For the last post.

You should have run it before doing the tutorial, as if there was missing packages, following it could have led to issues. Anyway, all the packages were available, so you’re good.

As for Java, I’m not sure, especially as I don’t have a Pi with Ubuntu MATE. It looks like the run.sh script is trying to use the Oracle version and it’s not available. Can you give the content of the script?

Also, try the following command:

sudo update-alternatives --config java

It will allow you to select which version to use. Tell me which one(s) it lists as available on your system.

1 Like

I typed the command in and I got this.

There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java
Nothing to configure.

The command that the u gave me said this /usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java
The command the run.sh command is asking for is /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/bin/java

So they are diff thats a good sign. Now all we need to do is find that java that it is asking for and were good. Probibly Raspbian had that java preinstalled.

P:S I did this command apt-cache policy xcompmgr libgl1-mesa-dri libalut0 libalut-dev mesa-utils at the beginning of the tutorial but I did it again at the end after I got the run.sh error for me to copy and paste for the forum.

Give us the content of the run.sh script (it’s a text file, you can open it with Pluma): either the Java used is hardcoded to Oracle and it can be changed for your version, or it tries to detect the version to use and for some reason it finds some trace of Oracle Java.

EDIT: you can also try to install Oracle Java 8 but I’m not sure it’s available for ARM. I assume it is if the script is tailored for it but it’s quite possible that you can’t through the PPA linked above and you might have to do it manually…

1 Like

Here is the script.

#!/bin/sh
#
# script to run minecraft on ARM linux.  for reference:
#
#   http://rogerallen.github.io/jetson/2014/07/31/minecraft-on-jetson-tk1/
#   https://devtalk.nvidia.com/default/topic/764821/embedded-systems/minecraft-on-the-jetson-tk1/
#   https://gist.github.com/rogerallen/91526c9c8be1a82881e0
#

# !!! YOU MUST PERSONALIZE ALL OF THIS INFO !!!
# your personal login/password.  chmod 700 to keep this private
MINECRAFT_LOGIN=
MINECRAFT_USERNAME=
MINECRAFT_PASSWORD=
# where did you store the native liblwjgl.so and libopenal.so?
MINECRAFT_NATIVE_PATH=~/Minecraft/Natives
# info from initial run data in .minecraft/launcher_profiles.json
MINECRAFT_CLIENTTOKEN=b61fb8e9-97bf-435f-8354-1feaba0ce734
MINECRAFT_UUID=12345678-1234-1234-1234-123456789abc
MINECRAFT_VERSION=1.8

# SHOULD NOT NEED TO EDIT BELOW THIS LINE

# long list of paths from the minecraft logged commandline
CP=/home/pi/.minecraft/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar:/home/pi/.minecraft/libraries/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar:/home/pi/.minecraft/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar:/home/pi/.minecraft/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar:/home/pi/.minecraft/libraries/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar:/home/pi/.minecraft/libraries/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar:/home/pi/.minecraft/libraries/com/paulscode/codecwav/20101023/codecwav-20101023.jar:/home/pi/.minecraft/libraries/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar:/home/pi/.minecraft/libraries/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar:/home/pi/.minecraft/libraries/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar:/home/pi/.minecraft/libraries/io/netty/netty-all/4.0.23.Final/netty-all-4.0.23.Final.jar:/home/pi/.minecraft/libraries/com/google/guava/guava/17.0/guava-17.0.jar:/home/pi/.minecraft/libraries/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar:/home/pi/.minecraft/libraries/commons-io/commons-io/2.4/commons-io-2.4.jar:/home/pi/.minecraft/libraries/commons-codec/commons-codec/1.9/commons-codec-1.9.jar:/home/pi/.minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar:/home/pi/.minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar:/home/pi/.minecraft/libraries/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar:/home/pi/.minecraft/libraries/com/mojang/authlib/1.5.21/authlib-1.5.21.jar:/home/pi/.minecraft/libraries/com/mojang/realms/1.7.59/realms-1.7.59.jar:/home/pi/.minecraft/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar:/home/pi/.minecraft/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar:/home/pi/.minecraft/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/pi/.minecraft/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar:/home/pi/.minecraft/libraries/org/apache/logging/log4j/log4j-api/2.0-beta9/log4j-api-2.0-beta9.jar:/home/pi/.minecraft/libraries/org/apache/logging/log4j/log4j-core/2.0-beta9/log4j-core-2.0-beta9.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar:/home/pi/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.4-nightly-20150209/lwjgl_util-2.9.4-nightly-20150209.jar:/home/pi/.minecraft/libraries/tv/twitch/twitch/6.5/twitch-6.5.jar:/home/pi/.minecraft/versions/1.8.9/1.8.9.jar

# thanks to xRoyx on the nvidia dev forums for this update.
# the authtoken changes daily, so we need to login to authenticate
MINECRAFT_ATOKEN="$(\
curl -i \
  -H "Accept:application/json" \
  -H "content-Type:application/json" \
  https://authserver.mojang.com/authenticate \
  -X POST \
  --data '{"agent": {"name": "Minecraft","version": 1}, "username": "'$MINECRAFT_LOGIN'", "password": "'$MINECRAFT_PASSWORD'",  "clientToken": "'$MINECRAFT_CLIENTTOKEN'" }' \
  | sed '/accessToken":"/!d;s//&\n/;s/.*\n//;:a;/",/bb;$!{n;ba};:b;s//\n&/;P;D' \
)"
# '

echo "todays access token = "$MINECRAFT_ATOKEN

# run minecraft with all the right commandline options
/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/bin/java \
    -Xmn128M -Xmx1024M \
    -XX:+UseConcMarkSweepGC \
    -XX:+CMSIncrementalMode \
    -XX:-UseAdaptiveSizePolicy \
    -Djava.library.path=$MINECRAFT_NATIVE_PATH \
    -cp $CP \
  net.minecraft.client.main.Main \
    --username $MINECRAFT_USERNAME \
    --accessToken "$MINECRAFT_ATOKEN" \
    --uuid "$MINECRAFT_UUID" \
    --version $MINECRAFT_VERSION \
    --userProperties {} \
    --gameDir ~/.minecraft \
    --assetsDir ~/.minecraft/assets \
    --assetIndex $MINECRAFT_VERSION

Ok, the Oracle version is hardcoded in it. You can try to replace the line near the end:

/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/bin/java \

by:

/usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java \

(Don’t forget the \ at the end of the line.)

Or you can try to install the Oracle version on your Pi. I can’t really help there but I guess there are useful informations in the links listed at the start of the script.

1 Like

I changed the script and it gave me this when I ran it.

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 436 100 271 100 165 281 171 --:–:-- --:–:-- --:–:-- 281
todays access token = d701d47f115d4b89b8d2450d9d844d0c
OpenJDK Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
Error: Could not find or load main class net.minecraft.client.main.Main

Not sure if it’s because it needs Java Oracle because OpenJDK lacks some features, or if it can’t find the main jar file or something.

I guess the next thing to try would be the installation of Java Oracle.

EDIT: it looks like Raspbian comes with Java from Oracle preinstalled, that’s why it wasn’t mentioned in the tutorial you followed. AFAIK, it’s not included with Ubuntu MATE. But again, I don’t know if it uses the Raspbian repos, so it might be available to install through APT. If it’s not, you should be able to install it manually by following the instructions there: https://www.raspinews.com/installing-oracle-java-jdk-8-on-raspberry-pi/ (check on the Oracle website first to get the latest version and adapt the commands in the article).

1 Like

I on the 3th step. I unpack java to the usr/java dir I made. After installing java from ther website. This is the command.

sudo mkdir /usr/java
cd /usr/java
sudo tar -xzf jdk-8u131-linux-arm32-vfp-hflt.tar.gz

On the last one I got this.

tar (child): jdk-8u131-linux-arm32-vfp-hflt.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

I said to check the latest version on Oracle website because the article is a bit old and looking quickly on it, I think the current one is 1.51, which would mean that the file would be jdk-8u151-linux-arm32-vfp-hflt.tar.gz or a similar name.

Also, you should check if Ubuntu MATE for Pi is 32 or 64 bits (I guess it’s 32 like Raspbian but better check):

getconf LONG_BIT

This being said, your .tar.gz is not in /usr/java, so when you place yourself in that dir, tar can’t find it. You have to put the path to it. Assuming it’s in Downloads, the last command would be:

sudo tar -xzf ~/Downloads/jdk-8u151-linux-arm32-vfp-hflt.tar.gz

(Adapt accordingly if it’s in a different dir and with the right filename.)

But before doing that, have you checked if it was in the repos, in case Ubuntu MATE uses the Raspbian repos (which is unlikely but just in case…)?

sudo apt-get install oracle-java8-jdk
1 Like

Ok, so I did sudo apt-get install oracle-java8-jdk. It says there is no installation candidate. Also, I have been researching to see if they have a newer Oracle Website for the arm build of java for the pi. Ther is none. That’s the only Website I believe.

Yes, that’s the only website. What I meant is that the tutorial gives the commands to download version 1.31 (which was the latest when it was written) while the current version is now 1.51 on the website.

So, first things, first, do you get “32” or “64” with the command getconf LONG_BIT ?

1 Like

It said I have 32bit OS. Sorry if im stressing you.