yum install lrzsz报错已加载插件:fastestmirror Could not retrieve mirrorlist http://mirr

尹俊涛 2021-05-25 10:21:07
已加载插件:fastestmirror
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#52 - "Empty reply from server"


One of the configured repositories failed (未知),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...

4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:

yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>

5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64
[root@localhost ~]#
网上的解决方法不是很详细,希望有清晰的解释。
...全文
884 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
爱驹一族 2022-08-11
  • 打赏
  • 举报
回复

感谢两位大佬,我的旧版centos7的仓库是空的,更换阿里云的就好了。

mxy7651 2021-06-12
  • 打赏
  • 举报
回复 1

你先用阿里云的centos7(前提你为centos7的系统

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

然后清除yum缓存

yum clean all

然后可选建立缓存,可以不建立:yum makecache

然后安装lrzsz工具!!!

注意:如果还是不行的话用epel源,yum -y install epel    在安装你的lrzsz工具;;望采纳

mouse_zhu 2021-05-26
  • 打赏
  • 举报
回复 1
仓库不能用了,现在centos7的仓库很多都是空的,你找一个不是空的仓库就好了

18,828

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 专题技术讨论区
社区管理员
  • 专题技术讨论区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧