Linux – Can’t install PostgreSQL 9 server on Centos 6


Can't install PostgreSQL server on Centos Machine.

I simply added official repo with PostgreSQL

rpm -ivh

And then ran

yum install yum install postgresql95-server

Here is the error i am getting:

Error unpacking rpm package postgresql95-server-9.5.9-1PGDG.rhel6.x86_64
error: unpacking of archive failed on file /var/lib/pgsql: cpio: stat

I have tried PostgreSQL 9.4, 9.5, 9.6 and they all have same error.

Also other packages from this repo are installing without any problem

Does anybody know what is the problem here?

Best Answer

Try downloading the package locally, then install. But pay attention to the version you are downloading.

Quoted from

Distribution      Version
RHEL/CentOS/SL/OL 7 9.2  
RHEL/CentOS/SL/OL 6 8.4  
RHEL/CentOS/SL/OL 5 8.1 

Sorry about the formatting for the above. It is the best I can do with the limited tools we have here.