安装bzip2

安装bzip2

[root@localhost ~]# yum install bzip2

已加载插件:fastestmirror

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was

14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"



 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



安装bzip2,,,这是怎么回事

正在回答

登陆购买课程后可参与讨论,去登陆

3回答

这个应该是安装源地址无法解析,这样做,输入vi /etc/resolv.conf,把内容改为:

http://img1.sycdn.imooc.com//climg/5a9f4f170001614202510087.jpg

nameserver是dns

查询dns使用命令dig,如下显示的dns,也就是192.168.184.2

http://img1.sycdn.imooc.com//climg/5a9f4f680001621e04430113.jpg

祝学习愉快!

  • 输入这个vi /etc/resolv.conf显示找不到这个文件目录
    2018-03-07 12:28:47
  • 安装的哪个版本的CentOS,有没有配置网络
    2018-03-07 13:38:22
  • CentOS7,应该配置了,跟着视频配置的默认的以太网
    2018-03-07 13:53:17
提问者 qq_左撇子A_0 2018-03-07 14:56:30
提问者 qq_左撇子A_0 2018-03-07 14:12:04

http://img1.sycdn.imooc.com//climg/5a9f829f0001dd6f04980530.jpg

vi /etc/resolv.conf命令后是这个

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
Java Web基础入门2018版
  • 参与学习       716    人
  • 提交作业       185    份
  • 解答问题       1363    个

会Java?懂前端基础?想学后台开发?那么,赶快来学习《Java Web入门》路径吧。本路径主要介绍Java Web的基础知识,并配有大量案例,定会让你收获多多!

了解课程
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师