我不小心删除了postgressSQL,现在我无法使用yum命令。每次我尝试使用它,我都会遇到一个问题。有人能帮我解决这个问题吗?
[root@centos ~]# sudo yum check-update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 7.8 kB 00:00:00
* base: mirrors.nxtgen.com
* epel: repo.extreme-ix.org
* extras: mirrors.nxtgen.com
* updates: mirrors.nxtgen.com
Artifactory/signature | 183 B 00:00:00
Artifactory/signature | 1.5 kB 00:00:00 !!!
Artifactory-pro/signature | 183 B 00:00:00
Artifactory-pro/signature | 1.5 kB 00:00:00 !!!
base | 3.6 kB 00:00:00
docker-ce-stable | 3.5 kB 00:00:00
extras | 2.9 kB 00:00:00
hashicorp | 1.4 kB 00:00:00
jenkins | 2.9 kB 00:00:00
pgdg-common/7/x86_64/signature | 665 B 00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG
pgdg-common/7/x86_64/signature | 2.9 kB 00:00:00 !!!
https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-7-x86_64/repodata/repomd.xml: [Errno -1] Gpg Keys not imported, cannot verify repomd.xml for repo pgdg-common
Trying other mirror.
One of the configured repositories failed (PostgreSQL common RPMs for RHEL / CentOS 7 - x86_64),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=pgdg-common ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable pgdg-common
or
subscription-manager repos --disable=pgdg-common
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=pgdg-common.skip_if_unavailable=true
failure: repodata/repomd.xml from pgdg-common: [Errno 256] No more mirrors to try.
https://download.postgresql.org/pub/repos/yum/common/redhat/rhel-7-x86_64/repodata/repomd.xml: [Errno -1] Gpg Keys not imported, cannot verify repomd.xml for repo pgdg-common
[root@centos ~]#
字符串
1条答案
按热度按时间rjzwgtxy1#
我猜你删除ProgreSQL并没有导致你在yum上遇到的问题。看起来你要么删除了加密密钥,要么根据ProgreSQL网站(https://yum.postgresql.org/),它是在2024年1月3日更新的,所以你现在拥有的那个已经过时了。看起来你需要运行这个命令来更新密钥:
字符串
这应该能让你重新开始工作。如果没有,你也不关心PostgreSQL,那么我会运行以下命令永久禁用PostgreSQL仓库:
型