首页 > 系统相关 >学习-Niginx-执行yum install -y gcc时候报错“14: curl#6 - "Could not resolve host: mirrorlist.centos.org;

学习-Niginx-执行yum install -y gcc时候报错“14: curl#6 - "Could not resolve host: mirrorlist.centos.org;

时间:2025-01-04 17:33:48浏览次数:1  
标签:gcc resolve centos repository -- repo mirrorlist yum 报错

报错信息如下:

[root@localhost nginx-1.21.6]# yum install -y gcc
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
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

解决:

1.cd /etc/yum.repos.d
2.cp CentOS-Base.repo CentOS-Base.repo.bak
3.sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
4.sudo yum clean all
5.sudo yum makecache

标签:gcc,resolve,centos,repository,--,repo,mirrorlist,yum,报错
From: https://www.cnblogs.com/skystrive/p/18652142

相关文章

  • uniapp [安卓苹果App端] - 解决uni.scanCode扫码黑屏报错问题,uniApp app平台真机运行
    前言关于此问题网上的教程都无法解决,如果您的报错信息与我相似,即可解决。在uni-appApp端(安卓APP|苹果APP)开发中,解决使用uni.scanCode调起摄像头扫码黑屏问题,uniAPP真机调试扫码一片黑并且可能有报错,有时候连续扫码时首次没问题但第二次就会黑屏没反应(退出去再进来就......
  • 支付宝支付报错 ACQ.ACCESS_FORBIDDEN
    支付宝支付时报错:{"body":"{"alipay_trade_create_response":{"msg":"BusinessFailed","code":"40004","sub_msg":"ACCESS_FORBIDDEN","sub_code":"ACQ.ACCESS_FORBIDDEN&qu......
  • 支付宝支付报错 ACQ.ACCESS_FORBIDDEN
    支付宝支付时报错:{"body":"{"alipay_trade_create_response":{"msg":"BusinessFailed","code":"40004","sub_msg":"ACCESS_FORBIDDEN","sub_code":"ACQ.ACCESS_FORBIDDEN&qu......
  • nacos 报错排查
    报错内容 org.springframework.beans.factory.UnsatisfiedDependencyException:Errorcreatingbeanwithname'memoryMonitor'definedinURL[jar:file:/home/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-config-2.2.3.jar!/com/alibaba/nacos/config/se......
  • Vue3 启动报错:failed to load config from D:\file\vue\examination_front\vite.c
    今天在创建vue3项目的时候报错了一个启动开发服务器时遇到了一个构建错误 查询了一下,执行npm i的时候,他并没有帮我安装vitePSD:\file\vue\hello_vue3>npmlistvitehello_vue3@0.0.0D:\file\vue\hello_vue3└──(empty)最后执行安装,就能启动了PSD:\file\vue\h......
  • centos7升级gcc
    1.下载最新的GCC源码包http://ftp.gnu.org/gnu/gcc/wgethttp://ftp.gnu.org/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.gz或https://mirrors.cloud.tencent.com/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.gz解压tar-zxvfgcc-11.2.0.tar.gz2.下载依赖及配置文件yum-yinstallbzip......
  • STM32CubeMX输出报错“but MDK-ARM V5.32project generation have a problem.”
    前言笔者在使用STM32CubeMX+git协同开发时,从仓库拉取的STM32CubeMX工程使用STM32CubeMX输出代码时报错butMDK-ARMV5.32projectgenerationhaveaproblem。但本地新建一个工程可正常输出。使用的软件版本为●java:23.0.1●STM32CubeMX:6.13.0参考网上其他人分享的方法,......
  • 统信UOS报错qt.qpa.plugin:Could not load the Qt platform plugin "xcb" in “***”
    问题截图: 解决方案:执行命令sudoln-fs/usr/lib/x86_64-linux-gnu/libxcb-util.so.0/usr/lib/x86_64-linux-gnu/libxcb-util.so.1 参考链接:Ubuntu22.04中解决CouldnotloadtheQtplatformplugin“xcb“问题解决方法_couldnotloadtheqtplatformplugin"xcb......
  • 使用JSONObject.getString()时报错:Cannot resolve method ‘getString‘ in ‘JSONObjec
    目录使用JSONObject.getString()时报错:Cannotresolvemethod'getString'in'JSONObject',JSONObject三种库的用法一、背景描述二、问题解决1、使用org.json.JSONObject读取属性2、使用org.json.simple.JSONObject读取属性3、使用cn.hutool.json.JSONObject读取属性三、......
  • lio_sam_6axis编译报错解决办法
    lio_sam_6axis编译需要现安装gtsam4.0.2wget-O~/Downloads/gtsam.ziphttps://github.com/borglab/gtsam/archive/4.0.2.zipcd~/Downloads/&&unzipgtsam.zip-d~/Downloads/cd~/Downloads/gtsam-4.0.2/mkdirbuild&&cdbuildcmake-DGTSAM_BUILD_WITH......