Fedora运行sudo dnf update出现Failed to download metadata for repo ‘fedora-modular’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
cd /etc/yum.repos.d/
sudo vim /etc/yum.repos.d/fedora-modular.repo
[fedora-modular]
name=Fedora $releasever - $basearch - Modular
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Modular/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-$releasever&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
sudo touch /etc/yum.repos.d/fedora-modular.repo
sudo vim /etc/yum.repos.d/fedora-modular.repo
[fedora-modular]
name=Fedora $releasever - $basearch - Modular
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Modular/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-$releasever&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
按下Esc键退出编辑模式。
输入:wq命令保存并退出文件。
sudo vim /etc/yum.repos.d/fedora-updates-modular.repo
"fedora-updates-modular.repo" E212: Can't open file for writing
:wq!