Shnepp
Shnepp

Reputation: 3

Can't install pgaudit on Ubuntu

Trying to do everything by instruction in git. Clone the pgAudit extension:

git clone https://github.com/pgaudit/pgaudit.git

Change to pgAudit directory:

cd pgaudit

Checkout REL_13_STABLE branch (note that the stable branch may not exist for unreleased versions of PostgreSQL):

git checkout REL_13_STABLE

Build and install pgAudit:

make install USE_PGXS=1 PG_CONFIG=/usr/pgsql-13/bin/pg_config

BUT make commande doesn't work and shows:

make: *** No rule to make target 'install'. Stop.

Tried to update postgresql to 13 version, because there is version 12 in Ubuntu by default, but this didn't help.

Upvotes: 0

Views: 1252

Answers (1)

Striezel
Striezel

Reputation: 3758

Depending on the versions of Ubuntu and PostgreSQL you may not need to clone the Git repository of pgAudit and compile it from the sources.

For example, Ubuntu 20.04 has a package named postgresql-12-pgaudit which may be what you need. To install it, open your terminal and type

sudo apt-get install -y postgresql-12-pgaudit

into it. The package manager should take care of the rest. This assumes that you are still using PostgreSQL 12 and not version 13. Otherwise you may have to downgrade or check whether there is a corresponding package for your version of PostgreSQL.

The version in the package name may change for earlier or later versions of Ubuntu. For example, Ubuntu 21.04 uses postgresql-13-pgaudit while Ubuntu 18.04 still uses postgresql-10-pgaudit.

Upvotes: 1

Related Questions