配置yum源
使用yum安装相关软件包时一直提示以下错误: repodata/repomd.xml:[Errno 4] IOError: <urlopen error (113>,Error:Cannot retrieve repository metadata (repomd.xml) for repository:base. Please verify its path and try again。 这是由于fedora系统找不到yum源所导致的,所以我们需要重新设置yum源。之前自己也看过比较多的人介绍yum源的设置,他们大多都是使用上海交大/163/sohu等的yum源,具体做法是将.repo文件存放到/etc/yum.repos.d目录,然后再运行“yum makecache”即可。但是这种方法我试过很多次,我的系统就是没有反应。原因有二:要么就是yum源有问题;要么就是除了更改/etc/yum.repos.d目录下的.repo文件,还需要修改其他配置文件,这是其他人没有注意到的。事实证明,第一种推测是正确的。用的是中国科学技术大学(ustc)的yum源,具体配置如下: 1.删除/etc/yum.repos.d目录下所有.repo文件 [root@jiangdongguo yum.repos.d]# rm *.repo 2.再/etc/yum.repos.d目录下创建一个fedora.repo文件和fedora_update.repo(可有可无) [root@jiangdongguo yum.repos.d]# vim fedora.repo 内容: [fedora] name=Fedora $releasever - $basearch failovermethod=priority baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/$releasever/Everything/$basearch/os/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch enabled=1 metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [fedora-debuginfo] name=Fedora $releasever - $basearch -Debug failovermethod=priority baseurl=http:http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/$releasever/Everything/$basearch/debug/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch enabled=0 metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch [fedora-source] name=Fedora $releasever - Source failovermethod=priority baseurl=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/$releasever/Everything/source/SRPMS/ #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch enabled=0 metadata_expire=7d gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[root@jiangdongguo yum.repos.d]# vim fedora_update.repo
[updates] |