Skip to content
Advertisement

Problems instaling libpq-dev in ubuntu 20.04

I am currently trying to install libpq-dev to install psycopg2. The problem is, when I try to install it, an error occurs saying I don’t have the latest libpq5 version. However when I try to download the newer version of libpq5 the system says that I already have the latest version. An example of the error.

JavaScript

Advertisement

Answer

I would say you have installed the latest libpq (12.4-1) but libpq-dev needs older version (12.4-0) and this makes problem.

You may try to install older libpq

JavaScript

but if other program uses the latest version then older version can make problem with this program.

pgdg20 in 12.4-1.pgdg20.04+1 means it is not module from standard ubuntu repo but from some other repo – probably postgresql repo – and maybe this repo has also the latest version libpq-dev. You would search 12.4-1.pgdg20.04+1 in Google and maybe you could find also libpg-dev with 12.4-1.pgdg20.04+1


I found libpq-dev 12.4-1.pgdg20.04+1 and you can download .deb file and install it.

Or you can add this postgresql repo and install with apt-get. This method will also inform about updates and then you could install updates automatically.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement