1

I recently got a Raspberry Pi 5 and have just finished installing Raspberry Pi OS Bookworm and have noticed that running executables such as Minecraft PI and the official Minecraft Java launcher do not work. My Pi did not come pre-installed with any software like the ones stated.

I tried installing Minecraft Pi from the official website, and unzipped the tarball using the terminal. I then located the folder using the cd command and tried to run the Linux executable from there with ./minecraft-pi. I get the error cannot find file when the file is clearly in the directory I am trying to run it from. When I use the ls command to try and see if it is getting recognised by the terminal, it shows everything but the executable. (like images needed for the game, etc)

So since I can't run the game from the terminal, I tried doing it from the GUI. I double click on the executable and get a popup window asking me if I want to execute the program or execute it with the terminal. I have tried both of these options and nothing has happened, no windows open, nothing changes.

The YouTube video I watched on how to install Minecraft Pi was only 2 years old, and the person in the video used the sudo apt-get install minecraft-pi, but when I try to do the same thing I get the package not found error.

I've tried to download the Minecraft Java Launcher as a .deb file (since Raspbian is based on Debian) and have tried to install it, but then get the error unable to install.

The question I have is: how can I get these programs to run? I am new to Raspbian and have little experience with Linux based OSes.

Help would be much appriciated.

4
  • running executables such as Minecraft PI and the official Minecraft Java launcher do not work - did you install these things? They are not part of the standard Debian install Commented May 5 at 8:50
  • Thanks for the reply, Yes, I have tried installing both Minecraft PI and the Java Launcher using the command line and the "sudo apt-get install" command. I made sure my Pi was up to date by checking for updates and using the "sudo apt-get update" command. When I try to install these programs, all I get is an error message saying "cannot find package: minecraft-pi" Commented May 5 at 10:36
  • 1
    running executables such as Minecraft PI and the official Minecraft Java launcher do not work ... why would you try to run an executable that does not install successfully? ... you should be asking about installing, not about running
    – jsotola
    Commented May 5 at 18:35
  • When a file won't execute, commands "ls -l filename" will tell you if execute permissions "x" are set, "file filename" will tell you what type of file it is. For binary executables "ldd" will report what libraries it uses. Commented May 10 at 21:22

1 Answer 1

1

when I try to install the file using the "sudo apt-get install" command I get the error cannot find package

This means exactly what it says; it would have been useful if you had said what package name you used, of course.

APT is not a magical genie that you can ask for anything, unfortunately. You can only ask it for things that are available in the repositories it accesses.

I tried this on an up-to-date 64-bit RaspiOS 12 ("bookworm") system:

apt search minecraft

This will search the repositories for packages with "minecraft" or similiar in their name or brief description. The search is case insensitive. This is what I got:

Sorting... Done                              
Full Text Search... Done
libstb-dev/stable 0.0~git20220908.8b5f1f3+ds-1 arm64                                                   
  single-file image and audio processing libraries for C/C++ - development headers                     
                                                   
libstb0/stable 0.0~git20220908.8b5f1f3+ds-1 arm64                                                      
  single-file image and audio processing libraries for C/C++                      

minetest/stable 5.6.1+dfsg+~1.9.0mt8+dfsg-2 arm64
  Multiplayer infinite-world block sandbox                                                             

minetest-data/stable,stable 5.6.1+dfsg+~1.9.0mt8+dfsg-2 all                                            
  Multiplayer infinite-world block sandbox (data files)                                                

minetest-mod-pycraft/stable,stable 0.22-4 all                                                          
  Minetest mod - (most of) Raspberry PI Minecraft API  

minetest-server/stable 5.6.1+dfsg+~1.9.0mt8+dfsg-2 arm64                                               
  Multiplayer infinite-world block sandbox (server)  

python-picraft/stable,stable 1.0 all                                                                   
  Alternative API for controlling Minecraft from Python.

python-picraft-docs/stable,stable 1.0 all
  Documentation for the alternative Python Minecraft API.

python3-minecraftpi/stable,stable 0.22-4 all
  Raspberry PI Minecraft API Python client library                                                     

python3-picraft/stable,stable 1.0 all       
  Alternative API for controlling Minecraft from Python.     

I'm not a minecraft user, but I am pretty sure none of these is the actual Minecraft server, and that it is not in fact available from the default repositories.

So doing something like sudo apt-get install minecraft (again, you did not bother to include the actual package name you tried) comes back with "cannot find package". There is no mistake or malfunction here. It is telling you the package you want is not available to it.

Beware reading generic information online about Raspberry Pis and Minecraft. That stuff probably goes back for close to a decade and much of it will be out of date; I believe at one time minecraft was available straight from the Raspbian repos, but obviously it is not anymore. A quick search for "pi 5 minecraft" does, however imply that there are a number of ways of installing it from third party sources.


I tried installing Minecraft Pi from the official website, and unzipped the tarball using the terminal. I then located the folder using the cd command and tried to run the Linux executable from there with ./minecraft-pi. I get the error cannot find file when the file is clearly in the directory I am trying to run it from. When I use the ls command to try and see if it is getting recognised by the terminal, it shows everything but the executable. (like images needed for the game, etc)

I did this as well.

> tar -xzf minecraft-pi-0.1.1.tar.gz
> cd mcpi
> ls
api/  CONTROLS.txt  data/  HOW_TO_RUN.txt  LICENSE.txt  minecraft-pi*  VERSION.txt

The file is there and it is executable. Next:

> ./minecraft-pi 
exec: Failed to execute process './minecraft-pi': The file exists and is executable. Check the interpreter or linker?
Press any key to continue...

> file minecraft-pi 
minecraft-pi: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.26, BuildID[sha1]=ec7c5a7f459230e837d8551aab60b290e9599e63, stripped
Press any key to continue...

The problem here is that this was compiled for 32-bit and I'm using 64-bit. Fortunately, I had a Pi 3 on hand that's still running 32-bit bullseye.

> ./minecraft-pi 
./minecraft-pi: error while loading shared libraries: libGLESv2.so: cannot open shared object file: No such file or directory

There's no GUI installed so that makes sense. I checked what libraries it is linked to:

> ldd minecraft-pi    
linux-vdso.so.1 (0x7eff5000)                                                                   
/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0x76f83000)
libGLESv2.so => not found
libEGL.so => not found                                                                         
libbcm_host.so => /opt/vc/lib/libbcm_host.so (0x76f5c000)
libpng12.so.0 => not found
libSDL-1.2.so.0 => not found
libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76dd4000)
[...]        

That list is abbreviated but you can see there are a few things not found; libSDL is closely related to openGL(ES) and libpng is for .png images.

To check for which package libGLESv2.so is in:

> apt-file search libGLESv2.so
chromium-browser: /usr/lib/chromium-browser/swiftshader/libGLESv2.so
chromium-common: /usr/lib/chromium/libGLESv2.so
code: /usr/share/code/libGLESv2.so
code-exploration: /usr/share/code-exploration/libGLESv2.so
code-insiders: /usr/share/code-insiders/libGLESv2.so
libgles-dev: /usr/lib/arm-linux-gnueabihf/libGLESv2.so
libgles2: /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2
libgles2: /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.1.0
minecraft-pi: /opt/minecraft-pi/lib/brcm/libGLESv2.so
minecraft-pi: /opt/minecraft-pi/lib/mesa/libGLESv2.so
scratch3: /usr/lib/scratch3/libGLESv2.so
scratch3: /usr/lib/scratch3/swiftshader/libGLESv2.so

If you had a GUI installed, it would have been there already. The interesting thing here is the second last package from the bottom: minecraft-pi.

Presumably, this is because it is only compiled for 32-bit. As I said before, I'm not a minecraft user and eg., the fact that you were looking for the game itself not the server was a bit lost on me.

There are two things you can do here:

  • Try and install a 32-bit userland ("userland" = software besides the kernel, which a 64-bit kernel can run 32-bit executables if all the dependencies are met) inside your 64-bit OS: https://wiki.debian.org/Multiarch/HOWTO

    You would want --add-architecture armhf. I cannot promise anything about how easy this is or how well/if it will work for what you want to do, especially since this is something that needs the GUI stack.

  • Get another SD card and try the 32-bit version of RaspiOS. These are the ones on the download page that aren't marked "64-bit". You could also try the "Legacy" version, which is probably closer to the one that download was built for (on the page it actually says "Raspbian Wheezy", which is nine years old).

    I do not know if this means your memory will be limited to 3 GB, although the Pi 5 will still have a lot more going for it than the models that were current 9 years ago.

I'd recommend trying the second one first as it will be much easier than the first -- all you have to do is create the card, turn it on, and sudo apt install minecraft-pi.

6
  • This could have been worded much nicer Commented May 6 at 20:30
  • Thanks for the reply, I have edited my post to make it a bit more descriptive on my problem. Commented May 6 at 21:19
  • @goldilocks it is possible to be helpful, correct and nice all at the same time 🙂 OP is probably not as experienced as you. Commented May 8 at 18:12
  • The most egregious part is gone now but I still don't think it was over the top -- sometimes communicating your consternation with new users (who commonly make the same mistake, not realizing that their description of the problem leaves way too many ambiguities for anyone to be all the helpful with it, and that people generally dislike having to dragging info out of them). Anyway, I hate to say it worked this time ;) @snakes_are_cool I've re-written the last half of this in light of your edit. I can't promise 100%, but I think you have a reasonable shot now at getting it to work.
    – goldilocks
    Commented May 8 at 18:45
  • Thanks heaps for the reply. I have seemed to figure out what was going wrong. I found out that Minecraft Pi needs a folder called "game" that the game requires to run. For some reason, when I download the game off of the Minecraft Pi website, the tarball does not contain that folder for some reason. So when I run the file, I get the error "Cannot execute: required file not found". I have tried creating a folder called game with nothing in it, but to no avail. Commented May 12 at 3:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.