Ima*_*1ne 8 linux centos yum rhel8 centos8
我正在安装新的 Centos 8,并且第一次尝试使用 yum(在这台机器上)。对于任何安装或更新任何内容的尝试,我都会收到以下信息:
yum update
CentOS-8 - AppStream 0.0 B/s | 0 B 00:00
Failed to download metadata for repo 'AppStream'
Error: Failed to download metadata for repo 'AppStream'
Run Code Online (Sandbox Code Playgroud)
端口 80 已打开,但 nmap 报告它已关闭,可能是因为我尚未安装 apache。为了双重确定我已将端口 80 添加到firewalld,并已确认:
firewall-cmd --list-ports
25/tcp 80/tcp
Run Code Online (Sandbox Code Playgroud)
我尝试过各种建议,例如 yum clean 和清除 yum 缓存,但没有任何帮助。
这是 dnf.log 中的内容:
2020-03-30T19:33:01Z INFO --- logging initialized ---
2020-03-30T19:33:01Z DDEBUG timer: config: 4 ms
2020-03-30T19:33:01Z DEBUG Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync
2020-03-30T19:33:01Z DEBUG DNF version: 4.2.7
2020-03-30T19:33:01Z DDEBUG Command: yum install httpd
2020-03-30T19:33:01Z DDEBUG Installroot: /
2020-03-30T19:33:01Z DDEBUG Releasever: 8
2020-03-30T19:33:01Z DEBUG cachedir: /var/cache/dnf
2020-03-30T19:33:01Z DDEBUG Base command: install
2020-03-30T19:33:01Z DDEBUG Extra commands: ['install', 'httpd']
2020-03-30T19:33:01Z DEBUG repo: downloading from remote: AppStream
2020-03-30T19:33:02Z DEBUG error: Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org] (http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock).
2020-03-30T19:33:02Z DEBUG Cannot download 'http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org].
2020-03-30T19:33:02Z ERROR Failed to download metadata for repo 'AppStream'
2020-03-30T19:33:02Z DDEBUG Cleaning up.
2020-03-30T19:33:02Z SUBDEBUG
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 552, in load
ret = self._repo.load()
File "/usr/lib64/python3.6/site-packages/libdnf/repo.py", line 394, in load
return _repo.Repo_load(self)
RuntimeError: Failed to download metadata for repo 'AppStream'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 65, in main
return _main(base, args, cli_class, option_parser_class)
File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 98, in _main
return cli_run(cli, base)
File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 114, in cli_run
cli.run()
File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1134, in run
self._process_demands()
File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 832, in _process_demands
load_available_repos=self.demands.available_repos)
File "/usr/lib/python3.6/site-packages/dnf/base.py", line 406, in fill_sack
self._add_repo_to_sack(r)
File "/usr/lib/python3.6/site-packages/dnf/base.py", line 136, in _add_repo_to_sack
repo.load()
File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 558, in load
raise dnf.exceptions.RepoError(str(e))
dnf.exceptions.RepoError: Failed to download metadata for repo 'AppStream'
2020-03-30T19:33:02Z CRITICAL Error: Failed to download metadata for repo 'AppStream'
Run Code Online (Sandbox Code Playgroud)
显然不是这里的问题,但如果您将自己固定在 CentOS 8.1.1911 上,您将收到相同的错误,直到您将 /etc/yum.repos.d/ 存储库重新指向http://vault.centos.org http://mirror.centos.org的
归档时间: |
|
查看次数: |
121839 次 |
最近记录: |