DEV Community

sium_hossain
sium_hossain

Posted on

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)