I am downloading PostgreSQL on my Ubuntu version 18.04 and getting these errors while installing Postgresql version 12.
I have ran following command
sudo apt-get install postgresql postgresql-client
How to resolve these errors.
I am downloading PostgreSQL on my Ubuntu version 18.04 and getting these errors while installing Postgresql version 12.
I have ran following command
sudo apt-get install postgresql postgresql-client
How to resolve these errors.
4
Answers
You try execute sudo apt-get update before installation?
Try to run
sudo apt-get update
before the installation, and if it didn’t workI would recommend you download the PostgreSQL from the source by following below instructions:
Installing dependencies:
First, we are going to install age
For that make a new directory and a sub-directory:
Download some important libraries by using the below commands before starting the process of installation of Apache Age. Since we are specifically using Linux to install the apache age, we will be using the below commands.
Remember below commands might vary according to the operating systems.
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison
Installation of PostgreSQL from Source:
First, we will install PostgreSQL from source. We need an age compatible version of PostgreSQL. For now, age only supports Postgres 11 and 12.
You can also take help from the following link PostgreSQL Documentation:
Download the files in the folder age-installation/pg
The command will download and extract the tar files for Linux users from Source in the working directory.
Installing PG:
Now we will move toward installing PG
In the above command, the prefix flag will contain the path where you would like to install the PSQL. Replace your path with the path in the parenthesis.
I face similar problem while trying to install postgresql version 11 , You can check this blog for detailed installation guide with problems and fix ,
Postgresql installation for Ubuntu – blog
Hope it helps!
Try the following command
or simply paste this in a .sh file and run that sh file with sudo, postgresql 12 would be installed successfully.