0

I have a VM running Ubuntu Server 18.04.

I am trying to install libpostgressql-jdbc-java as root:

apt-get install -y libpostgresql-jdbc-java

This produces the following error:

E: Unable to locate package libpostgresql-jdbc-java

My /etc/apt/sources.list contains these lines:

deb http://archive.ubuntu.com/ubuntu bionic main
deb http://archive.ubuntu.com/ubuntu bionic-security main
deb http://archive.ubuntu.com/ubuntu bionic-updates main

I never modifed the configuration. It's a clean install with updates applied.

What am I doing wrong?

  • I'm on the same server version, and apt policy libpostgresql-jdbc* tells me that there is a candidate for installation in Universe. – Jos Feb 09 '20 at 14:24
  • Yes, I found as much in a package description somewhere. Didn't know how to add this. – Andrew J. Brehm Feb 09 '20 at 16:25

1 Answers1

0

Just go to http://packages.ubuntu.com and search for your package:

https://packages.ubuntu.com/search?keywords=libpostgresql-jdbc-java

Here you'll see you need the repository 'universe'.

bionic (18.04LTS) (java): Java database (JDBC) driver for PostgreSQL [universe]

How?

sudo add-apt-repository universe

if this is not working more manual:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"

Regarding of your goals for this system, you'll may want to add also restricted and/or multiverse. And take a look at partner.

You can find more information about the details here (https://help.ubuntu.com/community/Repositories/CommandLine), here (http://manpages.ubuntu.com/manpages/trusty/man5/sources.list.5.html) or here (https://help.ubuntu.com/community/SourcesList).
Please stay at official sources and avoid to enable/activate/add PPA or any other 3rd party sources, unless you know what you are doing.

LupusE
  • 404