Dependency on default-jre in debian package breaks pre 1.13 minecraft installations
The deb writes "default-jre" as a dependency in the affected versions rather than the previously specified "oracle-java8-installer | openjdk-8-jre". default-jre depends on openjdk-11-jre.
As noted in another issue MCL-11767 this breaks use of versions of minecraft earlier than 1.13, with no trivial work around. If you are not depending on java 11, please revert this dependency to java 8 (I have confirmed that indeed you are not by temporarily alterning my java install).
Environment
Ubuntu 18.04, openjdk-11-jre
The version drop down is unhelpfully preventing me from stating all affected versions: 2.1.7658, 2.1.9080, 2.1.9618.
Created Issue:
Dependency on default-jre in debian package breaks pre 1.13 minecraft installations
The deb writes "default-jre" as a dependency in the affected versions rather than the previously specified "oracle-java8-installer | openjdk-8-jre". default-jre depends on openjdk-11-jre.
As noted in another issue MCL-11767 this breaks use of versions of minecraft earlier than 1.13, with no trivial work around. If you are not depending on java 11, please revert this dependency to java 8 (I have confirmed that indeed you are not by temporarily alterning my java install).
Environment
Ubuntu 18.04, openjdk-11-jre
The version drop down is unhelpfully preventing me from stating all affected versions: 2.1.7658, 2.1.9080, 2.1.9618.
It won’t let me play mineville city it says disconnected world please fix thing bug
Brian, that's completely unrelated. Create a new bug report if you think it's a bug.
This is a one-line change to fix. Is there any reason it's taken more than 6 weeks without movement?
Hi, Is there currently no way to launch versions prior to 1.13? Can I manually change the dependency to openjdk-8-jre? Do I have install Java 8 to do that?
You can edit the control file in the deb. You need to change the dependency from "default-jre" to the previously used deps, "oracle-java8-installer | openjdk-8-jre".
In the absence of adequate support provided here, you can follow the instructions here. I used the ar approach (after "Rather than mess with permissions...") since it's simpler.
Yes, you will need java 8 installed, but that will likely already be there since it was needed until this was broken. If it's not, just do sudo apt install -f to fixup the installation after you do the dpkg install.
I'm sorry for the lack of my technical knowledge. What is deb (as far as I understand it's a .deb file) and what does it mean to change the dependency? The instructions you provided in this site are very helpful but I still don't understand what .deb file I should change and If I have the dpkg installed. Despite that thank you for your help. You already explained me this issue more than anyone else on the internet!
Never apologise for lack of knowledge. I'll explain what I mean, if it's at too much detail please excuse that.
Yes, "deb" means a dot-deb file. The dependencies are a list of packages that a package needs in order to work correctly. In this case, the Minecraft launcher package needs to have a Java installation in order to work (among other things), previously the version of Java that was specified was Java 8. Recently, the package maintainer changed the java dependency to the default Java version for ubuntu (this makes sense except that the default Java version on ubuntu is now Java 11 - which does not work with a whole swathe of things, including any Minecraft version prior to 1.13).
(Instruction note: all monospaced text in the instructions below are things tho type into the terminal).
OK, so much for the theoretical details. The dependencies are specified in the deb file (which as the stack exchange answer says is actually an archive in ar format). You can see this by opening the deb with file-roller (in a terminal try running file-roller Minecraft-2.1.9618.deb - or whichever version you have there); you'll see three files in the archive: "debian-binary", "data.tar.xz" and "control.tar.gz", the last being the one we want to change, but can't unfortunately with file-roller, though if you double click on it, you'll see its contents which look like the following:
This is what should be edited in the process that's described in the instruction from stack exchange. In our case we want to change the text that says "default-jre" in the "Depends:" line to say "oracle-java8-installer | openjdk-8-jre". So after editing it will look like this:
Package: minecraft-launcher Version: 2.1.9618 Architecture: amd64 Maintainer: Petr Mrázek <petr@mojang.com> Description: Official Minecraft Launcher Homepage: https://minecraft.net/ Pre-Depends: dpkg (>= 1.14.0), wget | curl, ca-certificates Depends: oracle-java8-installer | openjdk-8-jre, gconf-service, libasound2 (>= 1.0.23), libatk1.0-0 (>= 1.12.4), libc6 (>= 2.11), libcairo2 (>= 1.6.0), libcups2 (>= 1.4.0), libdbus-1-3 (>= 1.1.4), libexpat1 (>= 1.95.8), libfontconfig1 (>= 2.8.0), libgcc1 (>= 1:4.1.1), libgconf-2-4 (>= 2.31.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.26.0), libgtk2.0-0, libgtk-3-0 (>= 3.18.9), libnspr4 (>= 1.8.0.10), libnss3 (>= 3.17.2), libpango1.0-0 (>= 1.14.0), libstdc++6 (>= 4.8.0), libx11-6 (>= 2:1.4.99.1), libxcomposite1 (>= 1:0.3-1), libxcursor1 (>> 1.1.2), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxi6 (>= 2:1.2.99.4), libxrandr2 (>= 2:1.2.99.3), libxrender1, libxss1, libxtst6, libx11-xcb1, libxcb1, libbz2-1.0, lsb-base (>= 4.1), xdg-utils (>= 1.0.2), wget, libcurl3 | libcurl4 Copyright: All rights reservedAfter that's the case you continue the instruction from stack exchange. The instructions say that you should change the "Version:" line to something like (in your case) "Version: 2.1.9618~jz1", but in practice in this case that won't be necessary.
After you've finished all that and put the changes back into the deb file with ar r ../Minecraft-2.1.9618~jz1.deb control.tar.gz you can then do sudo dpkg -i ../Minecraft-2.1.9618~jz1.deb. This will re-install the launcher without marking Java 11 as a dependency.
Now, if dpkg complained that it can't install the launcher because of unsatisfied dependencies (this is unlikely if you had the launcher installed with a version prior to this bug), then you can do sudo apt-get install -f, which will install all the things that it needs to satisfy the deps.
At this point I would also then do sudo apt-get --purge autoremove, which will remove any packages that were automatically installed as dependencies but are no longer required. This will remove Java 11, which may cause other java-dependent programs from working because java dependency management is a nightmare.
I hope this helps. Please feel free to response here if you get stuck.
Also, to Mojang, the amount of work that it would require for you to fix this is vastly less than the amount of work that I've just put into helping one of your paying users. I think you should be feeling some form of shame for this.
Ok, I still have one issue. I tried to run the command "file-roller Minecraft-2.1.9618.deb -
" in the terminal. It opened two archive manager windows, the first saying "/home/zilberholts/-: no such file or directory" and the second window saying the same but for Minecraft-2.1.9618.deb. I also tried deleting the space between "Minecraft-2.1.9618.deb" and "-" and the same thing happened. My launcher version is 2.1.9618, I checked it in the about tab in my minecraft launcher.Edit: I'm sorry for the strikethrough. When I try to delete it the symbol - gets deleted too
Use the file name for the launcher that you have. I rename mine so that they match the version they are since Mojang for some unfathomable reason gives every version the same file name, "Minecraft.deb". So you can repeat the instructions above with file-roller Minecraft.deb and so on. You'll need to do that in the directory where the file is.
Hi, how to locate the "Minecraft.deb" file? I tried doing this for the Minecraft.deb file I found in my downloads folder that I downloaded when installing the game. I followed instructions step by step but ar r ../Minecraft-2.1.9618~jz1.deb control.tar.gz didn't work and every command after that too. I'm stuck now because there is literally nothing about it on the internet.
Edit: I ran ar r ../Minecraft-2.1.9618~jz1.deb control.tar.gz after saving changes and closing the control.tar.gz and when I gave it another try and reopened the control.tar.gz the changes were not saved
The following will do the whole thing, including the download (first line) and install (last line - if it complains at the end, do sudo apt-get install -f).
I executed every command here one after another very smoothly. There were no errors. I have even done "sudo apt-get --purge autoremove" at the end (it didn't remove anything though) But the game still crushes and is unable to launch.
Can you try sudo apt remove minecraft-launcher and then do sudo dpkg -i Minecraft~jzfixed.deb again.
Also, before you do that (just for my information), can you paste the output of dpkg -s minecraft-launcher.
Here is the output of dpkg -s minecraft-launcher. Still doesn't work.
Package: minecraft-launcher
Status: install ok installed
Maintainer: Petr Mrázek <petr@mojang.com>
Architecture: amd64
Version: 2.1.9618
Depends: oracle-java8-installer | openjdk-8-jre, gconf-service, libasound2 (>= 1.0.23), libatk1.0-0 (>= 1.12.4), libc6 (>= 2.11), libcairo2 (>= 1.6.0), libcups2 (>= 1.4.0), libdbus-1-3 (>= 1.1.4), libexpat1 (>= 1.95.8), libfontconfig1 (>= 2.8.0), libgcc1 (>= 1:4.1.1), libgconf-2-4 (>= 2.31.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.26.0), libgtk2.0-0, libgtk-3-0 (>= 3.18.9), libnspr4 (>= 1.8.0.10), libnss3 (>= 3.17.2), libpango1.0-0 (>= 1.14.0), libstdc++6 (>= 4.8.0), libx11-6 (>= 2:1.4.99.1), libxcomposite1 (>= 1:0.3-1), libxcursor1 (>> 1.1.2), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxi6 (>= 2:1.2.99.4), libxrandr2 (>= 2:1.2.99.3), libxrender1, libxss1, libxtst6, libx11-xcb1, libxcb1, libbz2-1.0, lsb-base (>= 4.1), xdg-utils (>= 1.0.2), wget, libcurl3 | libcurl4
Pre-Depends: dpkg (>= 1.14.0), wget | curl, ca-certificates
Description: Official Minecraft Launcher
Homepage: https://minecraft.net/
Copyright: All rights reserved
It's a bit different from the content of control.tar.gz you sent in previous comments
Looks like it's still picking up openjdk-11's java then. Run sudo apt purge openjdk-11-*.
Will I be able to launch new minecraft versions if I do that?
It's working for me with 1.15. Maybe Mojang will migrate to Java11 at some point, but they haven't yet.
It worked after I've done sudo apt purge openjdk-11-*. Thank you so much for your help and patience! You are absolutely the most helpful person I've met on the internet in my entire life!
No worries. Glad I could help.
The final issue that you saw is useful information, and I'm not sure how Mojang will deal with it when they get around to trying to fix this. Obviously openjdk-11-jre semantically conflicts with minecraft-launcher. The old way of dealing with this might have been to add a Conflicts: openjdk-11-jre to the deb control file. This is now necessary since many users will have unfortunately installed Java 11 because of the incorrect Depends: default-jre declaration; these all need to be fixed (at least for people who want to run older versions of Minecraft), but there is no automatic way to do this, and a Conflicts: declaration is pretty heavy handed (though the alternative of a Breaks: field is not possible since it has to be made in the breaker, not the breakee).
The only suggestion that I can make here is that the package should detect the presence of openjdk-11-jre during pre-inst and emit a warning to the user with instructions to remove that package. Maybe they should talk to a debian packager to understand how to get themselves out of the mess they have created.
Mojang, lyssnar ni inte?
This is still broken on the recently released 2.1.10835 version. This means that an upgrade from a manually fixed version as described above will break the user again. Thanks.
Note the default-jre in the Depends line here.
Hi there!
Does this issue still occur on the newest version of the Launcher?
If yes, could you please write how to reproduce this issue in a manner written below?
Steps to Reproduce:
Observed Results:
(Briefly describe what happens)
Expected Results:
(Briefly describe what should happen)
This ticket will automatically reopen when you reply.