How do I install PostgreSQL version 14 on Ubuntu 21.04?

Ubuntu 20.04 only gave me the obsolete PostgreSQL 12. After upgrading to "21.04 (Hirsute Hippo)" I got version 13. How do I install the latest version (14)?

1 Answer

Follow the instructions on the Wiki:

sudo apt install curl ca-certificates gnupg
curl | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
sudo sh -c 'echo "deb $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt update
sudo apt install postgresql-14

This worked for me on Ubuntu 21.04, but note that older Ubuntu releases may not be supported.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like