DEV Community

sium_hossain
sium_hossain

Posted on

2

legacy-install-failure Encountered error while trying to install package:psycopg2-binary

Shortnote

Install When you're using Ubuntu 22.04/ubuntu 22.10

sudo apt-get install libpq5=14.5-0ubuntu0.22.04.1 && sudo apt-get install libpq-dev
Enter fullscreen mode Exit fullscreen mode

Bonus
Django old version doesn't work well with psycopg2-binary latest or version > 8
You can resolve this issue by installing

pip install psycopg2-binary==2.8.6
Enter fullscreen mode Exit fullscreen mode

Hope it will save you some time

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more