You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application

Error: You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application

Solusi:

sudo apt-get install python-psycopg2
sudo apt-get install libpq-dev

Jika masih error dalam install paket libpq-dev

Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libpq-dev : Depends: libssl-dev but it is not going to be installed
Depends: krb5-multidev but it is not going to be installed
Depends: comerr-dev but it is not going to be installed

Solusi:

  • apt-get clean && sudo apt-get autoclean
  • apt-get update
  • apt-get install libssl-dev krb5-multidev comerr-dev
  • apt-get -f install
  • apt-get install libpq-dev

Selesai