pg_buildext command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
pg_buildext: command not found
or when using sudo you get the following error message
sudo: pg_buildext: command not found
Solutions to pg_buildext: command not found
How To Fix pg_buildext: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu pg_buildext is provided by postgresql-common package.
postgresql-common is:
The postgresql-common package provides a structure under which multiple versions of PostgreSQL may be installed and/or multiple clusters maintained at one time.
The commands provided are pg_conftool, pg_createcluster, pg_ctlcluster, pg_dropcluster, pg_lsclusters, pg_renamecluster, pg_upgradecluster, pg_virtualenv.
PostgreSQL is a fully featured object-relational database management system. It supports a large part of the SQL standard and is designed to be extensible by users in many aspects. Its features include ACID transactions, foreign keys, views, sequences, subqueries, triggers, outer joins, multiversion concurrency control, and user-defined types and functions.
To fix this problem, we can install more using the command below.
sudo apt-get -y install postgresql-common
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install postgresql-common.
sudo apt -y install postgresql-common
Or if you have aptitude installed you can use the following command.
sudo aptitude install postgresql-common
Summary
In this tutorial we learn how to fix pg_buildext command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.