Subject: Error whilst installing PG14

From: Ste Millington <[email-masked]>
Date: Wed, 4 May 2022 16:37:42 +0100

I am running the script below to install PostGres14 on Ubuntu 20.04

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
	wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc
| sudo apt-key add -
	sudo add-apt-repository -y ppa:ubuntugis/ppa
	sudo apt-get update

	sudo apt-get -y install postgresql-14 postgresql-14-postgis-3

Earlier today this worked fine. I'm now getting the error.

Not sure why MySQL libraries are required to install PostGres?!  Any
help would be much appreciated.

TRUE
OK
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Get:2 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease [86.6 kB]
Hit:3 https://repos.azul.com/zulu/deb stable InRelease
Get:4 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal InRelease [23.8 kB]
Hit:5 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:6 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:7 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:8 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64
Packages [365 kB]
Get:9 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal/main amd64
Packages [63.5 kB]
Fetched 539 kB in 2s (353 kB/s)
Reading package lists...
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 https://repos.azul.com/zulu/deb stable InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:6 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease
Hit:7 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  gdal-data libaec0 libarmadillo9 libarpack2 libboost-serialization1.71.0
  libcfitsio8 libcharls2 libcommon-sense-perl libdap25 libdapclient6v5
  libepsilon1 libfreexl1 libfyba0 libgdal26 libgeos-3.9.1 libgeos-c1v5
  libgeotiff5 libgmpxx4ldbl libhdf4-0-alt libhdf5-103 libjson-perl
  libjson-xs-perl libkmlbase1 libkmldom1 libkmlengine1 libllvm10 libminizip1
  libmysqlclient21 libnetcdf15 libnspr4 libnss3 libogdi4.1 libpoppler97
  libpq-dev libpq5 libproj15 libproj19 libprotobuf-c1 libqhull7 librttopo1
  libsfcgal1 libspatialite7 libsuperlu5 libsz2 libtypes-serialiser-perl
  liburiparser1 libxerces-c3.2 pgdg-keyring postgresql-14-postgis-3-scripts
  postgresql-client-14 postgresql-client-common postgresql-common proj-bin
  proj-data
Suggested packages:
  geotiff-bin gdal-bin libgeotiff-epsg libhdf4-doc libhdf4-alt-dev hdf4-tools
  ogdi-bin postgresql-doc-14 postgis
The following NEW packages will be installed:
  gdal-data libaec0 libarmadillo9 libarpack2 libboost-serialization1.71.0
  libcfitsio8 libcharls2 libcommon-sense-perl libdap25 libdapclient6v5
  libepsilon1 libfreexl1 libfyba0 libgdal26 libgeos-3.9.1 libgeos-c1v5
  libgeotiff5 libgmpxx4ldbl libhdf4-0-alt libhdf5-103 libjson-perl
  libjson-xs-perl libkmlbase1 libkmldom1 libkmlengine1 libllvm10 libminizip1
  libmysqlclient21 libnetcdf15 libnspr4 libnss3 libogdi4.1 libpoppler97
  libproj15 libproj19 libprotobuf-c1 libqhull7 librttopo1 libsfcgal1
  libspatialite7 libsuperlu5 libsz2 libtypes-serialiser-perl liburiparser1
  libxerces-c3.2 pgdg-keyring postgresql-14 postgresql-14-postgis-3
  postgresql-14-postgis-3-scripts postgresql-client-14
  postgresql-client-common postgresql-common proj-bin proj-data
The following packages will be upgraded:
  libpq-dev libpq5
2 upgraded, 54 newly installed, 0 to remove and 24 not upgraded.
Need to get 68.4 MB of archives.
After this operation, 293 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 libaec0
amd64 1.0.4-1 [19.1 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/universe amd64 libarpack2
amd64 3.7.0-3 [92.8 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal/universe amd64
libsuperlu5 amd64 5.2.1+dfsg1-4 [159 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/universe amd64
libarmadillo9 amd64 1:9.800.4+dfsg-1build1 [93.2 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64
libboost-serialization1.71.0 amd64 1.71.0-6ubuntu6 [302 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal/universe amd64
libcfitsio8 amd64 3.470-3 [466 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal/universe amd64 libcharls2
amd64 2.0.0+dfsg-1build1 [74.1 kB]
Get:8 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal/main amd64
gdal-data all 3.3.2+dfsg-2~focal2 [473 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/main amd64
libcommon-sense-perl amd64 3.74-2build6 [20.1 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal/universe amd64 libdap25
amd64 3.20.5-1 [435 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/universe amd64
libdapclient6v5 amd64 3.20.5-1 [92.2 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal/universe amd64
libepsilon1 amd64 0.9.2+dfsg-4 [41.0 kB]
Get:13 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64
libpq-dev amd64 14.2-1.pgdg20.04+1+b1 [137 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal/universe amd64 libfyba0
amd64 4.1.1-6build1 [113 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal/universe amd64
libfreexl1 amd64 1.0.5-3 [33.4 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal/universe amd64
libhdf4-0-alt amd64 4.2.14-1ubuntu1 [268 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal/universe amd64 libsz2
amd64 1.0.4-1 [5,188 B]
Get:18 http://archive.ubuntu.com/ubuntu focal/universe amd64
libhdf5-103 amd64 1.10.4+repack-11ubuntu1 [1,311 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal/universe amd64
libminizip1 amd64 1.1-8build1 [20.2 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal/universe amd64
liburiparser1 amd64 0.9.3-2 [39.3 kB]
Get:21 http://archive.ubuntu.com/ubuntu focal/universe amd64
libkmlbase1 amd64 1.3.0-8build1 [45.4 kB]
Get:22 http://archive.ubuntu.com/ubuntu focal/universe amd64
libkmldom1 amd64 1.3.0-8build1 [152 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal/universe amd64
libkmlengine1 amd64 1.3.0-8build1 [72.5 kB]
Ign:24 http://archive.ubuntu.com/ubuntu focal-updates/main amd64
libmysqlclient21 amd64 8.0.28-0ubuntu0.20.04.3
Get:25 http://archive.ubuntu.com/ubuntu focal/universe amd64
libnetcdf15 amd64 1:4.7.3-1 [341 kB]
Get:26 http://archive.ubuntu.com/ubuntu focal/universe amd64
libogdi4.1 amd64 4.1.0+ds-1build1 [198 kB]
Get:27 http://archive.ubuntu.com/ubuntu focal/main amd64 libnspr4
amd64 2:4.25-1 [107 kB]
Get:28 http://archive.ubuntu.com/ubuntu focal-updates/main amd64
libnss3 amd64 2:3.49.1-1ubuntu1.6 [1,256 kB]
Get:29 http://archive.ubuntu.com/ubuntu focal/main amd64 libpoppler97
amd64 0.86.1-0ubuntu1 [915 kB]
Get:30 http://archive.ubuntu.com/ubuntu focal/universe amd64 libproj15
amd64 6.3.1-1 [925 kB]
Get:31 http://archive.ubuntu.com/ubuntu focal/universe amd64 libqhull7
amd64 2015.2-4 [152 kB]
Get:32 http://archive.ubuntu.com/ubuntu focal/universe amd64
librttopo1 amd64 1.1.0-1 [178 kB]
Get:33 http://archive.ubuntu.com/ubuntu focal/universe amd64
libxerces-c3.2 amd64 3.2.2+debian-1build3 [878 kB]
Get:34 http://archive.ubuntu.com/ubuntu focal/universe amd64 libgdal26
amd64 3.0.4+dfsg-1build3 [6,156 kB]
Err:24 http://security.ubuntu.com/ubuntu focal-updates/main amd64
libmysqlclient21 amd64 8.0.28-0ubuntu0.20.04.3
  404  Not Found [IP: 91.189.91.38 80]
Get:35 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64
libpq5 amd64 14.2-1.pgdg20.04+1+b1 [170 kB]
Get:36 http://archive.ubuntu.com/ubuntu focal/main amd64 libgmpxx4ldbl
amd64 2:6.2.0+dfsg-4 [9,128 B]
Get:37 http://archive.ubuntu.com/ubuntu focal/main amd64 libjson-perl
all 4.02000-2 [80.9 kB]
Get:38 http://archive.ubuntu.com/ubuntu focal/main amd64
libtypes-serialiser-perl all 1.0-1 [12.1 kB]
Get:39 http://archive.ubuntu.com/ubuntu focal/main amd64
libjson-xs-perl amd64 4.020-1build1 [83.7 kB]
Get:40 http://archive.ubuntu.com/ubuntu focal/main amd64 libllvm10
amd64 1:10.0.0-4ubuntu1 [15.3 MB]
Get:41 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64
pgdg-keyring all 2018.2 [10.7 kB]
Get:42 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64
postgresql-client-common all 238.pgdg20.04+1 [92.0 kB]
Get:43 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64
postgresql-client-14 amd64 14.2-1.pgdg20.04+1+b1 [1,614 kB]
Get:44 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal/main amd64
libgeos-3.9.1 amd64 3.9.1-1~focal0 [604 kB]
Get:45 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64
postgresql-common all 238.pgdg20.04+1 [229 kB]
Get:46 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64
postgresql-14 amd64 14.2-1.pgdg20.04+1+b1 [15.8 MB]
Get:47 http://archive.ubuntu.com/ubuntu focal/universe amd64
libprotobuf-c1 amd64 1.3.3-1 [18.9 kB]
Get:48 http://archive.ubuntu.com/ubuntu focal/universe amd64
libsfcgal1 amd64 1.3.7-4ubuntu3 [1,926 kB]
Get:49 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal/main amd64
libgeos-c1v5 amd64 3.9.1-1~focal0 [72.1 kB]
Get:50 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal/main amd64
proj-data all 7.2.1-1~focal0 [7,919 kB]
Get:51 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64
postgresql-14-postgis-3-scripts all 3.2.1+dfsg-1.pgdg20.04+1 [1,098
kB]
Get:52 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64
postgresql-14-postgis-3 amd64 3.2.1+dfsg-1.pgdg20.04+1 [3,404 kB]
Get:53 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal/main amd64
libproj19 amd64 7.2.1-1~focal0 [1,103 kB]
Get:54 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal/main amd64
libgeotiff5 amd64 1.7.0-2~focal0 [70.4 kB]
Get:55 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal/main amd64
libspatialite7 amd64 5.0.0-1~focal1 [1,768 kB]
Get:56 http://ppa.launchpad.net/ubuntugis/ppa/ubuntu focal/main amd64
proj-bin amd64 7.2.1-1~focal0 [170 kB]
Fetched 67.1 MB in 5s (13.1 MB/s)

---

From: Christoph Berg <[email-masked]>
Date: Wed, 4 May 2022 19:30:14 +0200

Re: Ste Millington
> help would be much appreciated.

Postgis has a lot of dependencies. Possibly "apt --no-install-recommends"
makes libmysqlclient21 go away.

>   404  Not Found [IP: 91.189.91.38 80]

That's a package from Ubuntu, you need to raise this with them:

$ host 91.189.91.38
38.91.189.91.in-addr.arpa domain name pointer banjo.canonical.com.

Christoph

---

From: Dominik George <[email-masked]>
Date: Wed, 4 May 2022 19:34:56 +0200 (GMT+02:00)

Hi,

> Earlier today this worked fine. I'm now getting the error.

Which error? I cannot find one in the output you pasted.

-nik