我试图在 CentOS7 上安装 postgresql11。我在官网找到了安装说明:https : //www.postgresql.org/download/linux/redhat/
然后我按照它的步骤并选择以下参数:
1.version: 11
2.platform: RedHat Enterprise,CentOS, Scientific or Oracle version 7
3.architecture: x86_64
Run Code Online (Sandbox Code Playgroud)
得到安装 resository RPM 的命令:
yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Run Code Online (Sandbox Code Playgroud)
我在服务器上运行成功。然后我尝试运行安装客户端软件包的命令:
yum install postgresql11
Run Code Online (Sandbox Code Playgroud)
执行此命令时出现以下错误:
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
Run Code Online (Sandbox Code Playgroud)
当我尝试删除这个包使用命令时,我遇到了同样的错误:
yum erase pgdg-redhat-repo
Run Code Online (Sandbox Code Playgroud)
我在 /etc/yum.repos.d use 命令中找不到任何内容:
cd /etc/yum.repos.d/ && grep pgdg-redhat-all.repo ./*
Run Code Online (Sandbox Code Playgroud)
我已经在谷歌搜索过这个错误,似乎没有人遇到过这个错误。有谁知道如何解决这个问题?
他们似乎在准备 rpm 时犯了一个包装错误。在 中/etc/yum.repos.d/pgdg-redhat-all.repo
,您会找到一个部分
[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.
Run Code Online (Sandbox Code Playgroud)
只需删除k
s 后的s 就]
可以了。此错误已被报告
归档时间: |
|
查看次数: |
939 次 |
最近记录: |