亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org

这篇具有很好参考价值的文章主要介绍了亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://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

亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org,Redis,Linux,linux,centos,运维

解决步骤:

1、修改虚拟机的网络连接模式为 NAT模式

亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org,Redis,Linux,linux,centos,运维

2、右击桌面,打开终端

①首先查看网关配置文件名:

输入

ifconfig

亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org,Redis,Linux,linux,centos,运维

②配置网卡信息:

vi /etc/sysconfig/network-scripts/ifcfg-ens32

 两种方法:

点击键盘 I ,开始输入

第一种:自动配置

亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org,Redis,Linux,linux,centos,运维

1、BOOTPROTO=dhcp(自动获取ip)

2、ONBOOT=yes(设置开机自启动)

ESC--》:wq

在终端输入

 service network restart

重启网络服务 

ping www.baidu.com

查看网络是否通,如图

亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org,Redis,Linux,linux,centos,运维

第二种:手动配置(之前配置有用的,但重新做了一遍,又不行了。把大体思路记录下吧)

①主机cmd,输入:

ipconfig

 找到所用的网的IP

亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org,Redis,Linux,linux,centos,运维

亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org,Redis,Linux,linux,centos,运维

BOOTPROTO= static (需手动配置) 

 ②

ESC--》:wq

在终端输入

 service network restart

重启网络服务 

ping www.baidu.com

查看网络是否通,如图

亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org,Redis,Linux,linux,centos,运维

验证

安装gcc

yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake

yum -y install wget httpd-tools vim

亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org,Redis,Linux,linux,centos,运维亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org,Redis,Linux,linux,centos,运维亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org,Redis,Linux,linux,centos,运维查看 gcc版本

gcc -v

亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org,Redis,Linux,linux,centos,运维

输出以上信息,即为成功文章来源地址https://www.toymoban.com/news/detail-695370.html

到了这里,关于亲测有效:虚拟机安装gcc,报错Could not retrieve mirrorlist http://mirrorlist.centos.org的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • apex安装常见的三个报错并成功解决(亲测有效)

    前三个方法我都遇到了错误,直到方法4才成功解决,建议看完全文后再决定使用哪种方法,或者直接使用方法4。 一开始我使用如下命令进行安装, 安装成功后,进入python,执行语句import apex进行验证是否安装成功,得到报错 于是在网上找了方法如下,遂将刚才安装的apex卸

    2024年02月11日
    浏览(30)
  • 【conda】pip安装报错,网络延时问题解决记录(亲测有效)

    1. pip install 报错如下所示 2. 解决方案: 制定某个库与库的版本的国内源链接下载方式 网络上解决方案也很多如下:没有用

    2024年02月02日
    浏览(29)
  • Windows下seata报错为can not register RM,err:can not connect to services-server的解决办法,亲测有效。

    nacoc下的服务: 点开seata的TC服务看一下里面的地址, 左下角为你该服务的ip地址。  上图我的ip地址是我目前在用的校园网地址也就是你的桌面右下角的网络地址。  我之前报错的原因呢是因为他这里的默认的ip是我之前虚拟机VMnet8的地址,这跟我另外三个的服务地址不出在

    2024年02月05日
    浏览(73)
  • [ 亲测有效 ] Tomcat环境变量配置报错闪退:The CATALINA_HOME (JRE_HOME) environment variable is not defined correctly

    今天启动tomcat时遇到的问题,点击运行startup.bat直接闪退没有页面。 首先我们需要找到出问题的原因,通过cmd启动命令行窗口 → 通过cd命令到tomcat的bin目录下 → startup.bat + 回车运行startup.bat文件 然后就会显示出问题的原因了。 如果报错信息为 The CATALINA_HOME environment variable

    2024年02月15日
    浏览(29)
  • 解决 Centos 安装 Python 3.10 的报错: Could not import runpy module

    操作环境 : CentOS 7 、 Gcc 4.8.5 、 Python 3.10.0 系统上已经有 2.x , 3.6 版本的 Python 了,但是还是想装一个 3.10 的。因为刚写的脚本文件是较高版本的,在 3.6 上无法正常运行, Python 语法不是很了解,只能从环境上下手了。 【注】Python 其他版本也适用,毕竟是编译器的问题,并

    2024年02月03日
    浏览(46)
  • (亲测有效)VMware ubuntu虚拟机扩容

    场景: VMware安装了一个ubuntu系统,现在ubuntu系统剩余空间不足,需要扩容。 解决步骤: 关闭虚拟机,状态如下: 2、点击编辑虚拟机设置-》扩展 3、输入最大磁盘大小-》点击扩展 4、等待成功后,这个时候只是分配800GB的扩展空间,但是虚拟机里面的磁盘空间还没增加,如要

    2024年02月02日
    浏览(40)
  • fatal: repository does not exist(亲测有效)

    记录一下今天遇到的bug 场景是这样的:不知道什么原因,我用git执行clone的时候报错:repository does not exist,几乎把所有有关的博客都看了,都没解决,然后我一个哥们儿给我来了条命令,你猜怎么着?可以了! 比如你要克隆的项目是https://github.com/apache/rocketmq-spring.git 那你就

    2024年02月13日
    浏览(34)
  • 解决克隆虚拟机后无法上网问题(亲测有效)

    克隆虚拟机后,所有的虚拟机都无法上网。 输入ifconfig命令,显示没有ip地址。 在网上找到的很多方法,大多是重新生成MAC,设置ip配置文件等。 重新打开网络服务多次,依然没有效果。 最终找到解决方法: 打开终端执行这条命令: 然后重启虚拟机,就能够上网并且有新的

    2024年02月11日
    浏览(22)
  • 【Android Studio】安装app报错Installation did not succeed. The application could not be installed: INSTALL

    安装app demo报错;app安装不上 Installation did not succeed. The application could not be installed: INSTALL_FAILED_INSUFFICIENT_STORAGE The device needs more free storage to install the application (extra space is needed in addition to APK size). 程序或手机内存空间不足 清理程序内存:Build - Clean Project 清理手机内存:清理多

    2024年02月07日
    浏览(43)
  • pip安装paddlepaddle报错ERROR: Could not install packages due to an OSError

    ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: \\\'C:\\\\Users\\\\yang\\\\AppData\\\\Local\\\\Packages\\\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\\\LocalCache\\\\local-packages\\\\Python39\\\\site-packages\\\\paddle\\\\include\\\\paddle\\\\phi\\\\kernels\\\\fusion\\\\cutlass\\\\memory_efficient_attention\\\\iterators\\\\predicated_tile_access_iter

    2024年02月21日
    浏览(82)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包