问题命名较纠结,且命名为源问题吧。
描述:执行yum命令显示以下错误:
</pre><pre name="code" class="html">已加载插件:langpacks, refresh-packagekit
Cannot retrieve metalink for repository: fedora/20/x86_64. Please verify its path and try again
</pre>连不上官方源的节奏。</p><p><pre name="code" class="plain">gedit /etc/yum.repos.d/fedora.repo
查看得知使用的源为官方源fedoraproject.org,在VM中使用虚拟机打开正常。换成163、中科大等国内源时问题依然存在。
手动或者使用
su -c "sed -i 's|^#baseurl|baseurl| ; s|^mirrorlist|#mirrorlist|' /etc/yum.repos.d/*"
将yum.repos.d下的文件修改掉。注意,修改前确保此文件夹下不包含其他文件夹。
解决。