嘟嘟社区

[疑问] Centos8 yum安装软件报错


腾讯云的服务器,跑的是Centos8系统,现在yum安装或者升级软件都提示
  1. [[email protected] ~]# yum update openssl
  2. Repository epel is listed more than once in the configuration
  3. Extra Packages for Enterprise Linux Modular 8 – x86_64                                                    0.0  B/s |   0  B     00:22   
  4. Errors during downloading metadata for repository ‘epel-modular’:
  5.   – Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-8&arch=x86_64&infra=stock&content=centos [SSL certificate problem: CA certificate key too weak]
  6. Error: Failed to download metadata for repo ‘epel-modular’: Cannot prepare internal mirrorlist: Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-8&arch=x86_64&infra=stock&content=centos [SSL certificate problem: CA certificate key too weak]

复制代码

在宝塔面板上装软件都提示

  1. install_soft.sh: line 8: /www/server/panel/install/public.sh: No such file or directory
  2. /install/0/pureftpd.sh: Scheme missing.
  3. URL transformed to HTTPS due to an HSTS policy
  4. –2022-04-25 16:01:36– https://download.bt.cn/install/public.sh
  5. Resolving download.bt.cn (download.bt.cn)… 116.10.184.232, 240e:a5:4200:89::256
  6. Connecting to download.bt.cn (download.bt.cn)|116.10.184.232|:443… connected.
  7. ERROR: The certificate of ‘download.bt.cn’ is not trusted.
  8. ERROR: The certificate of ‘download.bt.cn’ was signed using an insecure algorithm.
  9. |-Successify — 命令已执行! —

复制代码

在宝塔论坛发了帖子,回答是根证书过去,他们技术反馈

  1. #centos
  2. mv /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt_backup
  3. mkdir -p /etc/pki/tls/certs
  4. wget -O /etc/pki/tls/certs/ca-bundle.crt http://download.bt.cn/tools/ca/cacert.pem
  5. chmod 444 /etc/pki/tls/certs/ca-bundle.crt
  6. #ubuntu/debian
  7. echo "ca_certificate=/etc/ssl/certs/ca-certificates.crt" >> /etc/wgetrc
  8. 如果不行
  9. mv /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt.bak
  10. wget -O /etc/ssl/certs/ca-certificates.crt  http://download.bt.cn/tools/ca/cacert.pem
  11. chmod 644 /etc/ssl/certs/ca-certificates.crt

复制代码

我按照提示执行后,故障依旧,有大佬知道这该如何解决吗?

一般重装能解决大部分问题

buddha 发表于 2022-4-28 14:14
一般重装能解决大部分问题

上面有项目在跑着,能重装早就给他重装了

centos8要换源了。。都要停止维护了
建议centos7
换源
没事别更新,没什么好更的,扔在那里10年不yum update也没事
  1. update-crypto-policies –set LEGACY

复制代码

把epel源换掉,参考阿里云的教程 https://developer.aliyun.com/mirror/epel