Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7088

Reinstall postgres cluser in Ubuntu

$
0
0

I seem to have somehow deleted my postgres binaries (ubuntu 22.04).Running sudo apt install postgresql postgresql-contrib reinstalled the binaries for the pg 14 cluster:

18:42 $ pg_lsclustersVer Cluster Port Status                Owner    Data directory              Log file12  main    5432 down,binaries_missing postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log13  main    5432 down,binaries_missing postgres /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log14  main    5432 online                postgres /var/lib/postgresql/14/main /var/log/postgresql/postgresql-14-main.log

Running sudo pg_createcluster --start 12 main gives Error: no initdb program for version 12 found

How do I reinstall postgres versions 12 and 13? I have existing databases in these clusters.

Also:

apt-cache showpkg postgresql

gives:

Package: postgresqlVersions: 14+238 (/var/lib/apt/lists/ie.archive.ubuntu.com_ubuntu_dists_jammy_main_binary-amd64_Packages) (/var/lib/apt/lists/ie.archive.ubuntu.com_ubuntu_dists_jammy_main_binary-i386_Packages) (/var/lib/dpkg/status)

Viewing all articles
Browse latest Browse all 7088

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>