Linux安装软件出现“没有更多镜像可尝试”怎么解决?(求详细过程)
2条回答 默认 最新
- 柚子伴酒x 2022-11-21 16:04关注
看你是虚拟机方案如下:
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搜索关键字 search即可
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥30 eclipse开启服务后,网页无法打开
- ¥30 雷达辐射源信号参考模型
- ¥15 html+css+js如何实现这样子的效果?
- ¥15 STM32单片机自主设计
- ¥15 如何在node.js中或者java中给wav格式的音频编码成sil格式呢
- ¥15 不小心不正规的开发公司导致不给我们y码,
- ¥15 我的代码无法在vc++中运行呀,错误很多
- ¥50 求一个win系统下运行的可自动抓取arm64架构deb安装包和其依赖包的软件。
- ¥60 fail to initialize keyboard hotkeys through kernel.0000000000
- ¥30 ppOCRLabel导出识别结果失败