3

I was try to install postgresql11 on CentOS7. I found the instruction of install in offical site: https://www.postgresql.org/download/linux/redhat/

Then I follow it's step and select following parameter:

1.version: 11
2.platform: RedHat Enterprise,CentOS, Scientific or Oracle version 7
3.architecture: x86_64

Got the command for install the resository RPM:

yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

I run it on server successful. Then I try to run the command for install the client packages:

yum install postgresql11

I got following error when I execute this command:

File contains parsing errors: file:///etc/yum.repos.d/pgdg-redhat-all.repo
    [line 196]: [pgdg96-updates-debuginfo]k
    [line 203]: [pgdg95-updates-debuginfo]k

I met same error when I try to erase this package use command:

yum erase pgdg-redhat-repo

I couldn't found any content in /etc/yum.repos.d use command:

cd /etc/yum.repos.d/ && grep pgdg-redhat-all.repo ./*

I had already search this error in google and seems no one met this error. Does anyone knows how to solve this problem?

1 Answer 1

5

They seem to have made a packaging error when preparing that rpm. In /etc/yum.repos.d/pgdg-redhat-all.repo, you'll find a section

[pgdg10-updates-debuginfo]
name=PostgreSQL 10 for RHEL/CentOS $releasever - $basearch - Debuginfo
baseurl=https://download.postgresql.org/pub/repos/yum/debug/10/redhat/rhel-$releasever-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG

[pgdg96-updates-debuginfo]k
name=PostgreSQL 9.6 for RHEL/CentOS $releasever - $basearch - Debuginfo
baseurl=https://download.postgresql.org/pub/repos/yum/debug/9.6/redhat/rhel-$releasever-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG

[pgdg95-updates-debuginfo]k
name=PostgreSQL 9.5 for RHEL/CentOS $releasever - $basearch - Debuginfo
baseurl=https://download.postgresql.org/pub/repos/yum/debug/9.5/redhat/rhel-$releasever-$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG

# Debuginfo/debugsource packages for testing repos
# Available for 9.6 and above.

Just remove the ks after the ] and you should be fine. This bug has already been reported

1
  • 1
    It works! Thank you very much for your help and report bug to fix the problem Commented Mar 11, 2020 at 7:53

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.