
RUN pip3 install psycopg2-binary -no-binary psycopg2-binary RUN apt update -y & apt install -y build-essential libpq-dev For this, add the following commands to the dockerfile.

The second solution is to build the psycopg2 file and install libq and other dependencies.Change base image name to 'python:3.9.6-alpine3.14' I used 'python:3.9-slim-buster' at docker and I've got error. If you're getting an error, you'll probably see a number like 90xxx here.

If you want to know your libq version used in your docker-image, you can do the following, respectively. It is explained with examples in the answer given here. I didn't try local, solutions are for docker container.Īccording to the main image we defined at the beginning of the Dockerfile, our libq versions may differ.

Thanks for using this tutorial for installing PostgreSQL 10 on CentOS/RHEL 7/6 and Fedora 28/27/26 systems.I find 2 solutions. How to Install phpPgAdmin on CentOS using Yum Read below article to install phpPgAdmin. postgres=# \password postgresĬongratulation’s! You have successfully installed PostgreSQL Server. You may create a password for user postgres for security purpose. Also, enable PostgreSQL service to autostart on system boot.įor CentOS/RHEL 7 and Fedora systemctl start rviceįor CentOS/RHEL 6 service postgresql-10 startĪfter completing above steps, you have installed PostgreSQL 10 on your server, Let’s log in to postfix to verify that installation completed successfully. To start PostgreSQL service using the following command as per your operating systems. PostgreSQL data directory Path: /var/lib/pgsql/10/data/ Setp 4 – Start PostgreSQL Server PGDATA environment variable contains the path of data directory. usr/pgsql-10/bin/postgresql-10-setup initdbĪbove command will take some time to initialize PostgreSQL first time. To initialize database use below command. yum install postgresql10-server postgresql10Īfter installing PostgreSQL server, It’s required to initialize it before using the first time. Step 2 – Install PostgreSQL 10 ServerĪfter enabling PostgreSQL yum repository in your system use following command to install PostgreSQL 10 on your system with yum package manager. # CentOS/RHEL - 7 rpm -Uvh įor more details visit PostgreSQL repositories link page where you can get repository package rpm for various operating systems. The first step is to install PostgreSQL repository in your system, Use one of below commands as per your system architecture and operating system.

Advertisement Step 1 – Add Postgres Yum Repository
