76人参与 • 2025-03-11 • ar
执行 yum install -y devtoolset-8-gcc* 报错
[root@hcss-ecs-a901 make-4.3] yum install -y devtoolset-8-gcc*
省略...
transaction summary
======================================================================================================
install 5 packages (+17 dependent packages)total size: 67 m
installed size: 194 m
downloading packages:
warning: /var/cache/yum/x86_64/7/centos-sclo-rh/packages/devtoolset-8-gcc-gdb-plugin-8.3.1-3.2.el7.x86_64.rpm: header v4 rsa/sha1 signature, key id f2ee9d55: nokey
retrieving key from https://mirrors.aliyun.com/centos/rpm-gpg-key-centos-7
the gpg keys listed for the "centos-7 - sclo rh" repository are already installed but they are not correct for this package.
check that the correct key urls are configured for this repository.
failing package is: devtoolset-8-gcc-gdb-plugin-8.3.1-3.2.el7.x86_64
gpg keys are configured as: https://mirrors.aliyun.com/centos/rpm-gpg-key-centos-7
gpg密钥不匹配 或者 密钥缺失。
(一般来说,都是 .repo 文件的 gpgkey 设置错误导致的)
gpg(gnu privacy guard)密钥用于验证软件包的完整性和来源。
具体来说,它可以确保软件包在传输过程中没有被篡改,并且确实是由合法的发布者创建的。
gpg 密钥分为公钥和私钥两部分:
在使用 yum 安装软件包时,系统会使用 gpg 公钥来验证软件包的签名,以确保软件包的安全性。
2.1 运行命令:
vi /etc/yum.repos.d/centos-sclo-scl-rh.repo
2.2 替换文件内容如下(请别直接抄,把 gpgkey 的 url 换成你需要的 url)
# centos-sclo-rh.repo # # please see http://wiki.centos.org/specialinterestgroup/sclo for more # information [centos-sclo-rh] name=centos-$releasever - sclo rh baseurl=https://mirrors.aliyun.com/centos/$releasever/sclo/$basearch/rh/ gpgcheck=1 enabled=1 gpgkey=https://mirrors.aliyun.com/centos/rpm-gpg-key-centos-7,https://www.centos.org/keys/rpm-gpg-key-centos-sig-sclo
2.3 引入 gpgkey
rpm --import https://mirrors.aliyun.com/centos/rpm-gpg-key-centos-7 rpm --import https://www.centos.org/keys/rpm-gpg-key-centos-sig-sclo
2.4 重新安装(我装我的gcc,你装你的软件去)
yum install -y devtoolset-8-gcc*
以上为个人经验,希望能给大家一个参考,也希望大家多多支持代码网。
您想发表意见!!点此发布评论
版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。
发表评论