yum在 CentOS 7 上使用的各种操作(例如 Plesk 更新、系统更新、包安装等)期间都会出现此类错误。
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Name or service not known"
14: curl#6 - "Failed to resolve host: mirrorlist.centos.org; Unknown error"
Cannot find a valid baseurl for repo: base/7/x86_64
原因:
2024 年 7 月 1 日,CentOS 7 终止使用,CentOS 团队已将其存储库移至 的存档vault.centos.org。如果不更新存储库 URL,则无法更新或验证软件包,从而导致这些错误。
解决方案
针对 Plesk 18.0.61 和 18.0.62 发布了自动修复。安装最新的 Plesk 更新后 ,存储库将自动调整。
对于 Plesk 18.0.60 及更早版本
1、通过SSH登录
2、运行此命令来下载并执行修复脚本:
curl -fsSL https://autoinstall.plesk.com/PSA_18.0.62/examiners/repository_check.sh | bash -s -- update >/dev/null
完!
评论 (0)