Linux安装软件出现“没有更多镜像可尝试”怎么解决?

Linux安装软件出现“没有更多镜像可尝试”怎么解决?(求详细过程)

img

看你是虚拟机方案如下:
1.配置好yum源,
2.去下载个离线的包(二进制包/rpm包)安装一下。
方案1实施:
无外网情况下,本地虚拟机yum源配置如下(提前上传镜像文件到/mnt/iso):(centos 7)

[root@localhost yum.repos.d]# mkdir /mnt/iso
[root@localhost yum.repos.d]# mount -o loop  /dev/cdrom   /mnt/iso/
[root@localhost yum.repos.d]# cat base.repo 
[iso]
name=iso
baseurl=file:///mnt/iso
enabled=1
gpgcheck=0

[root@localhost yum.repos.d]# echo 'mount -o loop  /dev/cdrom   /mnt/iso/'  >> /etc/rc.local 
[root@localhost yum.repos.d]# chmod +x /etc/rc.d/rc.local 

有外网情况下:
直接使用阿里云的源。如下:

[root@k8s yum.repos.d]# cat 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 - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#released updates 
[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

方案2实施如下:
访问http://rpmfind.net/linux/RPM/index.html

img

搜索关键字 search即可

你yum源弄好没有?因为你装的包在现有源没有,也没有其他源,所以就报这个错了
例如,你如果弄好源,是肯定可以装的,如图:

img

所以,明确弄好YUM源没有。