pgxn command not found

In this troubleshooting guide we learn how to fix pgxn command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

pgxn: command not found

or when using sudo you get the following error message

sudo: pgxn: command not found

Solutions to pgxn: command not found

How To Fix pgxn: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu pgxn is provided by pgxnclient package.

pgxnclient is:

The PGXN Client is a command line tool designed to interact with the PostgreSQL Extension Network at https://pgxn.org/ allowing searching, compiling, installing, and removing extensions in PostgreSQL databases.

To fix this problem, we can install more using the command below.

sudo apt-get -y install pgxnclient

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install pgxnclient.

sudo apt -y install pgxnclient

Or if you have aptitude installed you can use the following command.

sudo aptitude install pgxnclient

Summary

In this tutorial we learn how to fix pgxn command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.