I wrote some install instructions involving the command
apt-get install libgdbm5
...but newer ubuntu versions only have libgdbm6
(focal onwards I think)
Clearly I could write out different instructions for different versions, but is there easy way to write this command so that it would run on either ubuntu version and install whichever of the two packages is available?
I wondered if apt-get install libgdbm
might be provided as some sort of useful alias, but no. Doesn't exist.
I wondered if apt-get install libgdbm*
would do something useful. That sort of works, but installs various other packages with the same prefix.
I saw this question but that's not asking about packages with number suffixes in the name.
$ wget http://de.archive.ubuntu.com/ubuntu/pool/main/g/gdbm/libgdbm5_1.14.1-6_amd64.deb
... and install withsudo dpkg -i libgdbm5_1.14.1-6_amd64.deb
(No dependencies / no conflicts.) – Knud Larsen Jun 07 '21 at 13:03