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
相关推荐
迎風吹頭髮1 小时前
UNIX下C语言编程与实践53-UNIX 共享内存控制:shmctl 函数与共享内存管理
服务器·c语言·unix
迎風吹頭髮1 小时前
Linux内核架构浅谈8-Linux内核与UNIX的传承:设计思想与特性差异
linux·运维·架构
黑马金牌编程2 小时前
Linux 服务器常见的性能调优
linux·运维·服务器·性能优化
jieyu11192 小时前
网络、主机安全扫描工具
linux·安全·系统安全
tianyuanwo2 小时前
Linux进程管理中的T状态问题分析与解决体系
linux·运维·进程管理·t状态
liuyao_xianhui3 小时前
Linux_基本指令1
linux·运维·服务器
守望时空333 小时前
Linux挂载NTFS分区指南
linux
shan~~4 小时前
linux达梦数据库操作
linux·数据库·chrome
liliangcsdn4 小时前
LLM时代基于unstructured解析非结构化pdf
linux·服务器·数据分析
Codigger官方4 小时前
Linux 基金会牵头成立 React 基金会:前端开源生态迎来里程碑式变革
linux·前端·react.js