Home > Mobile >  Error while adding dependencies in order to install apache age
Error while adding dependencies in order to install apache age

Time:01-21

In order to install Apache age from source, i am installing development files for PostgreSQL server-side programming. For this i am using following command on my Ubuntu OS.

sudo apt install postgresql-server-dev-11

But i am getting this error "Unable to locate package postgresql-server-dev-11" image of the error

i am searching online but did not find yet.It would be great if someone help.

CodePudding user response:

This is because you do not have the correct Ubuntu version and the package does not exist.

To determine the major PostgreSQL version in a given release of Ubuntu find it here in Ubuntu Packages

  • 18.04 has PostgreSQL 10 (postgresql-server-dev-10)
  • 19.04 has PostgreSQL 11 (postgresql-server-dev-11)
  • 20.04 has PostgreSQL 12 (postgresql-server-dev-12)

If you have ubuntu 19.04 you can follow this guide

CodePudding user response:

In the case there is no maintainer for the Version of PostgreSQL you are trying to install you have to build from source.

Download your PostgreSQL version source code. Then run these commands.

tar xf postgresql-version.tar.bz2
cd postgresql-version

Install dependencies. Then run the following.

./configure
make
su
make install
adduser postgres
mkdir -p /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

Reference from Official Docs

CodePudding user response:

Seems the package is not available from your package manager. But, since you want development files, it's best to get the source code directly from GitHub.

In your home directory do:

git clone https://github.com/postgres/postgres.git
cd postgres
git checkout "REL_11_STABLE"

then follow this guide https://www.thegeekstuff.com/2009/04/linux-postgresql-install-and-configure-from-source/

Official documentation for installing from source is here https://www.postgresql.org/docs/current/installation.html

CodePudding user response:

You should follow these steps:

sudo apt-get update
sudo apt-get -y install postgresql-12 postgresql-client-12
sudo systemctl status postgresql
  • Related