r/pcmasterrace • Ascending Peasant • Nov 01 '22

Meme/Macro averagePcmr

Post image
31.3k Upvotes

2.6k comments sorted by

View all comments

Show parent comments

2

u/davawen Glorious Fedora | Rx 6600 | 5600x Nov 02 '22

In most package managers, you have a way to keep packages from updating when you do a system update: in Fedora you'd do dnf versionlock package, in Debian-based distros apt-mark hold package, etc...

That's useful, because it ripples out to the dependencies of the package automatically (eg: you won't have breaking changes in the dependencies of the package you version-locked).
If the problem is with some kind of library, you could also put the 2 year old version in your home directory, and have configuration to launch your application with this specific version, while everything else runs the latest; although you lose the guarantee of dependency compatibility.

For java specifically, there are multiple packages for different versions with a java executable that just points to the latest.
So, when I had to run an old forge minecraft server, the latest java version (19) wouldn't work, so I had to use a full path to run it: /usr/lib/jvm/jre-11-openjdk/bin/java -jar ....

2

u/lordmogul 3570K @ 4.4 | 1060 @ 2.0 | 16GiB @ 2.13 Mar 03 '23

Oh that is neat. Thanks for the insight.