You are not logged in.
Pages: 1
Hello:
I found what would seem to be (?) a broken link in /usr/bin:
/usr/bin/!clhsdb
I then traced it ...
# ls -la /usr/bin/clhsdb
lrwxrwxrwx 1 root root 24 Mar 20 2019 /usr/bin/clhsdb -> /etc/alternatives/clhsdb
#
# ls -la /etc/alternatives/clhsdb
lrwxrwxrwx 1 root root 48 Mar 20 2019 /etc/alternatives/clhsdb -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/clhsdb
#
# ls -la /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/clhsdb
ls: cannot access '/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/clhsdb': No such file or directory
... and checked:
# ls /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/
java jjs keytool orbd pack200 policytool rmid rmiregistry servertool tnameserv unpack200
#
Having made sure it was not where it was supposed (?) to be I looked and found it somewhere else:
# locate clhsdb
/etc/alternatives/clhsdb
/usr/bin/clhsdb
/var/lib/dpkg/alternatives/clhsdb
#
I then traced those:
# ls -la /usr/bin/clhsdb
lrwxrwxrwx 1 root root 24 Mar 20 2019 /usr/bin/clhsdb -> /etc/alternatives/clhsdb
#
# ls -la /etc/alternatives/clhsdb
lrwxrwxrwx 1 root root 48 Mar 20 2019 /etc/alternatives/clhsdb -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/clhsdb
#
# ls -la /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/clhsdb
ls: cannot access '/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/clhsdb': No such file or directory
#
Rather confusing ...
The file is dated 20190324, too old to be a victim of the Debian merge war.
But a broken link surely needs fixing and I don't want to muck up my system.
Q: How to fix this? Maybe it is a product of some upgrade. eg: VBox
Thanks in advance.
Best,
A.
Offline
My first thought was maybe a package got removed. I can find clhsdb in daedalus but not in chimaera. In daedalus, apt-file shows the path to be different from what you posted. There's an extra 'jre' in yours. I don't have that package installed, so I don't know what it really does. You can also run dpkg -L <package> to see what files from a package are actually installed on your system.
$ apt-file find clhsdb
openjdk-8-jdk-headless: /usr/lib/jvm/java-8-openjdk-amd64/bin/clhsdb
$ apt-file list openjdk-8-jdk-headless
openjdk-8-jdk-headless: /usr/lib/jvm/java-8-openjdk-amd64/ASSEMBLY_EXCEPTION
openjdk-8-jdk-headless: /usr/lib/jvm/java-8-openjdk-amd64/THIRD_PARTY_README
openjdk-8-jdk-headless: /usr/lib/jvm/java-8-openjdk-amd64/bin/clhsdb
openjdk-8-jdk-headless: /usr/lib/jvm/java-8-openjdk-amd64/bin/extcheck
openjdk-8-jdk-headless: /usr/lib/jvm/java-8-openjdk-amd64/bin/hsdb
<snip>
Offline
Hello:
... run dpkg -L <package> to see what files from a package are actually installed ...
I went looking to see what openjdk* stuff I had installed and it turns out I have two versions:
~$ apt list | grep installed | grep "openjdk"
--- snip ---
openjdk-11-jre-headless/oldoldstable-security,now 11.0.23+9-1~deb10u1 amd64 [installed,automatic]
openjdk-11-jre/oldoldstable-security,now 11.0.23+9-1~deb10u1 amd64 [installed,automatic]
openjdk-8-jre-headless/now 8u275-b01-1~deb9u1 amd64 [installed,local]
openjdk-8-jre/now 8u275-b01-1~deb9u1 amd64 [installed,local]
~$
So I asked aptitude about that:
~$ aptitude why openjdk-11-jre-headless
i libreoffice-base Recommends default-jre | sun-java6-jre | java6-runtime | jre
i A default-jre Depends openjdk-11-jre
i A openjdk-11-jre Depends openjdk-11-jre-headless (= 11.0.23+9-1~deb10u1)
~$
~$ aptitude why openjdk-11-jre
i libreoffice-base Recommends default-jre | sun-java6-jre | java6-runtime | jre
i A default-jre Depends openjdk-11-jre
~$
~$ aptitude why openjdk-8-jre-headless
i libreoffice-base Recommends default-jre | sun-java6-jre | java6-runtime | jre
i A openjdk-8-jre Provides java6-runtime
i A openjdk-8-jre Depends openjdk-8-jre-headless (= 8u275-b01-1~deb9u1)
~$
~$ aptitude why openjdk-8-jre
i libreoffice-base Recommends default-jre | sun-java6-jre | java6-runtime | jre
i A openjdk-8-jre Provides java6-runtime
~$
And then looked to find their location:
~$ locate openjdk-8
/usr/share/application-registry/openjdk-8-archive.applications
/usr/share/applications/openjdk-8-policytool.desktop
/usr/share/doc/openjdk-8-jre
/usr/share/doc/openjdk-8-jre-headless
/usr/share/doc/openjdk-8-jre-headless/JAVA_HOME
/usr/share/doc/openjdk-8-jre-headless/README.Debian
/usr/share/doc/openjdk-8-jre-headless/README.alternatives
/usr/share/doc/openjdk-8-jre-headless/changelog.Debian.gz
/usr/share/doc/openjdk-8-jre-headless/copyright
/usr/share/icons/hicolor/16x16/apps/openjdk-8.png
/usr/share/icons/hicolor/24x24/apps/openjdk-8.png
/usr/share/icons/hicolor/32x32/apps/openjdk-8.png
/usr/share/icons/hicolor/48x48/apps/openjdk-8.png
/usr/share/lintian/overrides/openjdk-8-jre
/usr/share/lintian/overrides/openjdk-8-jre-headless
/usr/share/mime-info/openjdk-8-archive.keys
/usr/share/mime-info/openjdk-8-archive.mime
/usr/share/pixmaps/openjdk-8.xpm
/var/lib/dpkg/info/openjdk-8-jre-headless:amd64.conffiles
/var/lib/dpkg/info/openjdk-8-jre-headless:amd64.list
/var/lib/dpkg/info/openjdk-8-jre-headless:amd64.md5sums
/var/lib/dpkg/info/openjdk-8-jre-headless:amd64.postinst
/var/lib/dpkg/info/openjdk-8-jre-headless:amd64.postrm
/var/lib/dpkg/info/openjdk-8-jre-headless:amd64.preinst
/var/lib/dpkg/info/openjdk-8-jre-headless:amd64.prerm
/var/lib/dpkg/info/openjdk-8-jre:amd64.list
/var/lib/dpkg/info/openjdk-8-jre:amd64.md5sums
/var/lib/dpkg/info/openjdk-8-jre:amd64.postinst
/var/lib/dpkg/info/openjdk-8-jre:amd64.preinst
/var/lib/dpkg/info/openjdk-8-jre:amd64.prerm
/var/lib/dpkg/info/openjdk-8-jre:amd64.shlibs
/var/lib/dpkg/info/openjdk-8-jre:amd64.triggers
~$
~$ locate openjdk-11
/usr/share/application-registry/openjdk-11-archive.applications
/usr/share/doc/openjdk-11-jre
/usr/share/doc/openjdk-11-jre-headless
/usr/share/doc/openjdk-11-jre-headless/JAVA_HOME
/usr/share/doc/openjdk-11-jre-headless/README.Debian
/usr/share/doc/openjdk-11-jre-headless/README.alternatives
/usr/share/doc/openjdk-11-jre-headless/changelog.Debian.gz
/usr/share/doc/openjdk-11-jre-headless/copyright
/usr/share/icons/hicolor/16x16/apps/openjdk-11.png
/usr/share/icons/hicolor/24x24/apps/openjdk-11.png
/usr/share/icons/hicolor/32x32/apps/openjdk-11.png
/usr/share/icons/hicolor/48x48/apps/openjdk-11.png
/usr/share/lintian/overrides/openjdk-11-jre
/usr/share/lintian/overrides/openjdk-11-jre-headless
/usr/share/mime-info/openjdk-11-archive.keys
/usr/share/mime-info/openjdk-11-archive.mime
/usr/share/pixmaps/openjdk-11.xpm
/var/lib/dpkg/info/openjdk-11-jre-headless:amd64.conffiles
/var/lib/dpkg/info/openjdk-11-jre-headless:amd64.list
/var/lib/dpkg/info/openjdk-11-jre-headless:amd64.md5sums
/var/lib/dpkg/info/openjdk-11-jre-headless:amd64.postinst
/var/lib/dpkg/info/openjdk-11-jre-headless:amd64.postrm
/var/lib/dpkg/info/openjdk-11-jre-headless:amd64.prerm
/var/lib/dpkg/info/openjdk-11-jre:amd64.list
/var/lib/dpkg/info/openjdk-11-jre:amd64.md5sums
/var/lib/dpkg/info/openjdk-11-jre:amd64.postinst
/var/lib/dpkg/info/openjdk-11-jre:amd64.prerm
~$
The directory /usr/share/application-registry/openjdk-8-archive.applications was last modified 20201202 but the directory /usr/share/application-registry/openjdk-11-archive.applications was last modified 20240418 which leads me to suspect that the first one is redundant/unneeded.
Attempting to remove openjdk-8 looks like this:
~$ sudo apt purge openjdk-8-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
openjdk-8-jre*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 260 kB disk space will be freed.
Do you want to continue? [Y/n] n
~$
ie: just openjdk-8-jre
But attempting to remove openjdk-11 looks like this:
~$ sudo apt purge openjdk-11-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
default-jre* openjdk-11-jre*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 640 kB disk space will be freed.
Do you want to continue? [Y/n] n
~$
ie: it also drags along default-jre.
At some point in time, openjdk-8-jre was locally installed (obviously) by me.
But I cannot remember that far back, much less why.
Should I just purge it?
Thanks in advance.
Best,
A.
Last edited by Altoid (2024-05-06 15:59:27)
Offline
I also had two versions installed...
apt list | grep installed | grep "openjdk"
...
openjdk-11-jre-headless/oldstable-security,now 11.0.23+9-1~deb11u1 amd64 [installed,automatic]
openjdk-17-jre-headless/stable-security,now 17.0.11+9-1~deb12u1 amd64 [installed,automatic]
...
So, I tried to get rid of it...
root@GamesBox:/root nala purge openjdk-11-jre-headless
====================================================================================================================================================================================
Purging
====================================================================================================================================================================================
Package: Version: Size:
openjdk-11-jre-headless 11.0.23+9-1~deb11u1 175.7 MB
====================================================================================================================================================================================
Summary
====================================================================================================================================================================================
Purge 1 Packages
Disk space to free 175.7 MB
Do you want to continue? [Y/n]
╭─ Purging Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Removing: openjdk-11-jre-headless:amd64 (11.0.23+9-1~deb11u1)
Well, that's 175Mb recovered space. And who knows what kinds of adventures... I would only install it if I was programming, I'm not.
thanks for the heads-up.
pic from 1993, new guitar day.
Offline
apt list | grep installed | grep "openjdk"
Or simply apt list --installed openjdk\*
So, I tried to get rid of it...
I would only install it if I was programming, I'm not.
Programmers would use the JDK, not the JRE.
Ignore the (poorly chosen) "openjdk" name, it's the bit after the number.
The JRE is the runtime environment - for users running software - and whilst some software can run across different versions, others require a specific version (because functionality might get renamed/removed between major versions).
It's entirely possible for a regular non-programmer users to have 8, 11, and 17 installed for three different pieces of software, and to need all three of them.
If one only installs correctly packaged software via Apt, then Apt should know if a package is still needed or not.
However, if one has any Java software they use outside of Apt (e.g. in /opt), they should carefully test it to determine what JRE version(s) they might need to keep. (And consider creating a stub package for it so Apt knows it still needs it.)
3.1415P265E589T932E846R64338
Offline
Pages: 1