Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required OpenJDK version 18 could not be installed #49

Open
ppconde opened this issue Mar 26, 2023 · 1 comment
Open

Required OpenJDK version 18 could not be installed #49

ppconde opened this issue Mar 26, 2023 · 1 comment
Assignees

Comments

@ppconde
Copy link

ppconde commented Mar 26, 2023

Hey there!

When trying to setup a minecraft server using SetupMinecraft.sh with an SSD mounted to the raspberry pi it doesn't install into the SSD folder even when changing the directory from the script.

I wanted to set the server folder as /mnt/ssd/minecraft, so I changed the script to:

DirName=$(readlink -e /mnt/ssd) if [ -z "$DirName" ]; then DirName=~ fi

This seemed to work because the folder minecraft was created there and some other folders related to the OpenJDK installation as well. But then an error is thrown after trying to install OpenJDK:
Required OpenJDK version 18 could not be installed.

When checking java --version, these are the results:
openjdk 20 2023-03-21 OpenJDK Runtime Environment (build 20+36-snap) OpenJDK Server VM (build 20+36-snap, mixed mode, sharing) from ubuntu using the command line

What should I do?

Best regards,
Pedro

@TheRemote
Copy link
Owner

The system OpenJDK is never used. It only uses the one it downloads. This is a path error.

Get rid of the readlink on your path. The proper way to set this up is like this:

curl https://raw.githubusercontent.com/TheRemote/RaspberryPiMinecraft/master/SetupMinecraft.sh | sed 's+DirName=$(readlink -e ~)+DirName=/your/path+g' | bash

Notice that in this command (which is what I usually recommend to people trying to do this) does not have the readlink. Simply change it to the actual path DirName=/mnt/ssd. That's all this is.

Hopefully that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants