Linux yum安装pgsql出现Bad GPG signature错误

官方文档:https://www.postgresql.org/download/linux/redhat/

bash 复制代码
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum install -y postgresql12-server
sudo /usr/pgsql-12/bin/postgresql-12-setup initdb
sudo systemctl enable postgresql-12
sudo systemctl start postgresql-12

按照官方文档操作执行如下命令:

bash 复制代码
sudo yum install -y postgresql12-server

提示找不到,此时需要进行如下操作:

bash 复制代码
# 查找repo文件,复制pgdg-redhat-all.repo这个文件名
ls -l /etc/yum.repos.d/
bash 复制代码
# 编辑这个配置文件,将刚刚复制的文件名添加进去
vim /etc/yum/pluginconf.d/releasever_adapter.conf

继续执行:sudo yum install -y postgresql12-server

出现错误:Error: Failed to download metadata for repo 'pgdg-common': repomd.xml GPG signature verification error: Bad GPG signature

此时只需要修改安装命令即可:

bash 复制代码
sudo yum install -y --nogpgcheck postgresql12-server
相关推荐
WHD30632 分钟前
苏州勒索病毒加密 服务器数据解密恢复
运维·服务器
蜡笔小炘44 分钟前
LVS -- 持久链接(Persistent Connection)实现会话粘滞
运维·服务器
蜡笔小炘1 小时前
LVS -- 利用防火墙标签(FireWall Mark)解决轮询错误
服务器·数据库·lvs
生活很暖很治愈1 小时前
Linux——孤儿进程&进程调度&大O(1)调度
linux·服务器·ubuntu
HalvmånEver1 小时前
Linux:线程同步
linux·运维·服务器·线程·同步
喵叔哟1 小时前
06-ASPNETCore-WebAPI开发
服务器·后端·c#
Zach_yuan1 小时前
自定义协议:实现网络计算器
linux·服务器·开发语言·网络
岁杪杪1 小时前
关于运维:LINUX 零基础
运维·服务器·php
wdfk_prog2 小时前
[Linux]学习笔记系列 -- [drivers][I2C]I2C
linux·笔记·学习
VekiSon2 小时前
Linux内核驱动——杂项设备驱动与内核模块编译
linux·c语言·arm开发·嵌入式硬件