How to delete and reinstall Java
I've screwed up the Java package on my machine, and now the system can't see/run java. Background: In order to use packages NetRexx and NetRexx-Pipelines, which until recently depended on Java 8, I had both Java 8 and Java 11 installed, with update-alternatives mediating the two. Now the NetRexx products have been upgraded to work with Java >8, so I didn't need the Java 8 any more. I deleted that, but I'm guessing that update-alternatives wasn't notified. I removed the entries from its "database", but that hasn't helped. Poking around, I see various things like aliases defined in /etc, that refer to java, but don't have comments, etc. tying them to one or the other of the packages. I'm thinking that I need to delete the NetRexx components (easy), then Java 11, then reinstall Java and then NetRexx. Zypper shows | ● zypper se -i java-11 | Loading repository data... | Reading installed packages... | | S | Name | Summary | Type | ---+---------------------------------------+------------------------------------------------------------------------+-------- | i+ | java-11-openjdk | OpenJDK 11 Runtime Environment | package | i+ | java-11-openjdk-headless | OpenJDK 11 Runtime Environment | package When I try to remove them zypper says, | ● zypper rm java-11-openjdk{,-headless} | Reading installed packages... | Resolving package dependencies... | | The following 26 packages are going to be REMOVED: | apache-commons-lang3 apache-commons-logging bouncycastle flute java-11-openjdk | java-11-openjdk-headless libbase libfonts libformula liblayout | libloader libreoffice-base librepository libserializer pdftk pdftk-qgui | pentaho-libxml pentaho-reporting-flow-engine sac texlive-arara | texlive-collection-binextra texlive-collection-plaingeneric texlive-latex2nemeth | texlive-scheme-medium texlive-tex4ht texlive-texosquery | | 26 packages to remove. | After the operation, 209.0 MiB will be freed. | Continue? [y/n/v/...? shows all options] (y) which is not surprising, but how do I tell zypper to leave those other 24 alone? None of the zypper remove options seem to allow that. | -t, --type <TYPE> Type of package (package, patch, pattern, product). | -n, --name Select packages by plain name, not by capability. Default: false | -C, --capability Select packages solely by capability. Default: false | --details Show the detailed installation summary. Default: false | -r, --repo <ALIAS|#|URI> Work only with the specified repository. | -y, --no-confirm Don't require user interaction. Alias for the --non-interactive global | option. Default: false | -D, --dry-run Don't change anything, just report what would be done. A meaningful file | conflict check can only be performed if used together with | '--download-only'. Default: false | -u, --clean-deps Automatically remove unneeded dependencies. | -U, --no-clean-deps No automatic removal of unneeded dependencies. | | Solver options | | --debug-solver Create a solver test case for debugging. | --force-resolution Force the solver to find a solution (even an aggressive one) rather than | asking. | -R, --no-force-resolution Do not force the solver to find a solution, let it ask. | --solver-focus <MODE> Set the solvers general attitude when resolving a job. I tried to use YaST sw_single to delete the two Java 11 packages, but bizarrely, it tries to install them instead of removing them. Help! Leslie -- openSUSE Leap 15.2 x86_64
participants (1)
-
J Leslie Turriff