今天想在centos6.5下装台samba服务,结果yum 报错,查了一下原因,国外已经停止维护6下的yum源。
问题描述
Yum 源失效,无法正常使用 Yum,错误信息如下:
-
[root@openvpn ~]
# yum -y install samba samba-common samba-client
-
Loaded plugins: fastestmirror, refresh-packagekit, security
-
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
-
Eg. Invalid
release/repo/arch combination/
-
removing mirrorlist
with
no valid mirrors: /
var/
cache/yum/x86_64/
6/base/mirrorlist.txt
-
Error: Cannot retrieve repository metadata (repomd.xml)
for repository: base. Please
verify its
path
and try again
问题解决
不想挂载本地yum源了,找到量个 Yum 源地址:
http://mirrors.aliyun.com/centos-vault/6.5/os/x86_64/ 速度猛如虎
https://vault.centos.org/6.5/os/x86_64/ 国外的卡的一比
操作简单,把CentOS-Base.repo 里面的东西全部删掉,添加如下内容即可。
备份原文件:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
编辑
vi /etc/yum.repos.d/CentOS-Base.repo
内容:
-
[base]
-
name=CentOS-
6
-
failovermethod=priority
-
baseurl=http://mirrors.aliyun.com/centos-vault/
6.5/os/x
86_64/
-
gpgcheck=
0
测试:
-
[root@openvpn ~]
# yum -y install samba samba-common samba-client
-
Loaded plugins: fastestmirror, refresh-packagekit, security
-
Loading mirror speeds from cached hostfile
-
base | 3.7 kB 00:00
-
base/primary_db | 4.4 MB 01:19
-
Setting up
Install Process
-
Package samba
-3.6
.9
-164.el6.x86_64 already installed
and latest
version
-
Package samba-common
-3.6
.9
-164.el6.x86_64 already installed
and latest
version
-
Package samba-
client
-3.6
.9
-164.el6.x86_64 already installed
and latest
version
-
Nothing
to
do
转载:https://blog.csdn.net/hongkaihua1987/article/details/112311811
查看评论