I need to install postgres server 11 on ubuntu linux.
because it is recommended during the installation of postgres-11 and apache-age from source code:
i used this command in ubuntu linux
sudo apt install postgresql-server-dev-11
but it gives error:
Unable to locate package postgresql-server-dev-11
can someone please help me
4
Answers
Maybe directory where you have installed PostgreSQL with different name. The path you have installed PostgreSQL is specified when you used the ./configure –prefix={path} command during the installation process. It is commonly stored in /usr/local/ but that will depend on where you have specified the path to be.
On Ubuntu (apt), only these two packages are currently available:
So, you can install
postgreSQL 12
along withpostgresql-server-dev-12
But it is not necessary to install the
postgresql-server-dev-xx
package anymore, as the installation of PostgreSQL should already include all the necessary header files.This change was introduced in
PostgreSQL 9.2
, where thepg_config
script was updated to include the necessary compiler and linker flags, so extensions can be built against the PostgreSQL installation without the need for additional packages.This is probably happening because your version of Ubuntu does not have this package available. You could add the PostgreSQL package repository on your system, add the GPG key of it, and then update the package list. Just use these commands:
And then run your code
Here’s my reference Setup PostgreSQL 11
Actually, this
sudo apt install postgresql-server-dev-xx
command varies with the version of Ubuntu.Here are some examples:-
Package postgresql-server-dev-10: ubuntu0.18.04.1
Package postgresql-server-dev-12: ubuntu0.20.04.1
Package postgresql-server-dev-14: ubuntu0.22.04.1
Package postgresql-server-dev-all: This will cover almost all versions of ubuntu
For more details you can you can refer: Ubuntu-Package Search