标题: linux centos yum 报错「Errno 256」No more mirrors to try 解决方法 [打印本页] 作者: jiawang 时间: 2023-9-1 09:59 标题: linux centos yum 报错「Errno 256」No more mirrors to try 解决方法 报错现象:
[root@ods ~]# yum install chrony
Loaded plugins: fastestmirror
Determining fastest mirrors
file:///mnt/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /mnt/repodata/repomd.xml"
Trying other mirror.
Resolving Dependencies
--> Running transaction check
---> Package chrony.x86_64 0:3.2-2.el7 will be installed
--> Processing Dependency: libseccomp.so.2()(64bit) for package: chrony-3.2-2.el7.x86_64
--> Running transaction check
---> Package libseccomp.x86_64 0:2.3.1-3.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================================================================================
Installing:
chrony x86_64 3.2-2.el7 base 243 k
Installing for dependencies:
libseccomp x86_64 2.3.1-3.el7 base 56 k
Total download size: 299 k
Installed size: 773 k
Is this ok [y/d/N]: y
Downloading packages:
Error downloading packages:
libseccomp-2.3.1-3.el7.x86_64: [Errno 256] No more mirrors to try.
chrony-3.2-2.el7.x86_64: [Errno 256] No more mirrors to try.
方法一:
yum clean all '清空yum缓存
'yum list '重新加载'
如果还是无法安装,建议使用方法二
方法二:
挂载iso
[root@ods ~]# mount -o loop /home/oracle/dbcheck/rhel-server-7.6-x86_64-dvd.iso /mnt
mount: /dev/loop0 is write-protected, mounting read-only
[root@ods ~]# cd /etc/yum.repos.d/
[root@ods yum.repos.d]# ll
total 4
drwxr-xr-x. 2 root root 187 Jun 27 09:30 back
-rw-r--r-- 1 root root 590 Jun 29 16:08 CentOS-Base.repo
[root@ods yum.repos.d]# more CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=file:///mnt
gpgcheck=0
enabled=1
[root@ods yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak
[root@ods yum.repos.d]# ll
total 8
drwxr-xr-x. 2 root root 187 Jun 27 09:30 back
-rw-r--r-- 1 root root 590 Jun 29 16:08 CentOS-Base.repo.bak