yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常

这篇具有很好参考价值的文章主要介绍了yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

1.错误信息

已加载插件:langpacks, product-id, search-disabled-repos,
subscription-manager This system is not registered with an entitlement
server. You can use subscription-manager to register. There are no
enabled repos. Run “yum repolist all” to see the repos you have. To
enable Red Hat Subscription Management repositories:
subscription-manager repos --enable To enable custom repositories:
yum-config-manager --enable

2.解决步骤

在安装gcc的时候出现下面信息:
yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常

如果出现上面问题,只需要输入下面命令即可:
进入到/etc/yum.repos.d/目录,下载Centos-7.repo
下载的官网 http://mirrors.aliyun.com,复制下载链接
yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常
然后通过wget进行下载,如果没有wget可以直接下载Centos-7.repo,然后把Centos-7.repo文件上传到/etc/yum.repos.d/中即可

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

yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常

查看Centos-7.repo是否已经下载了
yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常

使用 yum clean allyum makecache 命令
yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常
如果 yum makecache256错误,修改CentOS-Base.repo文件即可:

vim /etc/yum.repos.d/CentOS-Base.repo

yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常

修改内容为(先删除原有内容,然后把替换为下面的内容,然后键盘esc键进入底行模式,输入 :wq 进行保存):

# 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-7 - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-7 - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-7 - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7

再次执行 yum makecache 命令
yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常

最后再次使用 yum install gcc 命令安装gcc,就可以成功安装了
yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常
yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常

yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常
yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常文章来源地址https://www.toymoban.com/news/detail-411172.html

到了这里,关于yum 无法安装gcc 出现Run “yum repolist all” to see the repos you have异常的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

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

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

相关文章

  • Abandoning the Bayer-Filter to See in the Dark 论文阅读笔记

    这是CVPR2022的一篇暗图增强的文章,TCL AI Lab与福州大学,韩国延世大学,安徽大学的合作论文 网络以黑暗环境下拍摄的color raw为输入,用一个de-bayer-filter module恢复无拜尔滤波器的raw data(文章认为拜尔滤波器使得光子数量被滤去许多,无拜尔滤波器的摄像机拍摄得到的raw d

    2024年02月16日
    浏览(36)
  • pycharm安装第三方库:Try to run this command from the system terminal. 问题解决

    PyCharm安装第三方依赖库报错:Try to run this command from the system terminal. 问题解决 PyCharm安装第三方库报错:Try to run this command from the system terminal. Make sure that you use the correct version of ‘pip’ installed for your Python interpreter located at ‘C:UserskrislongAppDataLocalProgramsPythonPython38python.e

    2024年02月12日
    浏览(27)
  • 为啥yum源repolist为0?自己经常出错和常用的解决办法

    yum repolist  显示结果为0 常见两种情况:  第一种: 首先应该查看自己本地存放yum 源的位置,ls /etc/yum.repos.d/ 显示为空,这里需要配置自己的yum源,可以自行创建一个文件以.repo 为后缀的文件名 这里我配置为 local.repo ,应为我这里没有源所以我自行创建,先挂载我自己的镜

    2024年02月13日
    浏览(50)
  • vscode报错解决:npm ERR! Missing script: “dev“ npm ERR! npm ERR! To see a list of scripts, run:

    详细的报错信息如下图所示, 仔细阅读报错信息发现,是因为没有Script脚本\\\"dev\\\"而报错,让你看看script列表然后再运行npm run命令。 打开package.json文件,找到scripts列表,将其中的“server”改为“dev”,如下图所示, 这样再运行npm run dev命令就可以正常运行了。最后,希望能帮

    2024年02月03日
    浏览(39)
  • 解决WSL2的ubuntu20.04中安装docker出现无法连接的问题(Cannot connect to the Docker daemon)

    wsl2的ubuntu20.04系统安装docker可以参考官网教程操作,我个人喜欢参考其中的离线安装方式:Install from a package。只需要按照官网一步步操作即可,跟普通的ubuntu20.04的安装是一样的步骤。 在安装完以后,发现一旦使用docker相关命令会出现下述问题: 说明docker没有正常启动。这

    2024年04月23日
    浏览(40)
  • You may need to configure your browser or application to trust the Charles Root Certificate. See SSL

    抓包环境 雷电9模拟器,Charles v4.6.3 抓包过程中遇到的问题 一、 抓不到包,Charles一片空白 解决方案:Postern设置问题,点我点我点我 二、 抓到的https全是unknown,并且提示: You may need to configure your browser or application to trust the Charles Root Certificate. See SSL Proxying in the Help menu. 解决

    2024年02月03日
    浏览(38)
  • Maven出现报错 ; Unable to import maven project: See logs for details错误的多种解决方法

    问题现象;  IDEA版本:  Maven 版本 :     3.3.9   0.检查   maven  的设置 :F:softewaremavenapache-maven-3.9.3conf 1.  检查 Settting  --Maven 设置 2.  检查 Maven --Importing  jdk  3. 检查 Runner  jdk  4  检查 本地仓库 5.  排除以上之后 问题还存在 https://www.jb51.net/article/189570.htm 点击maven

    2024年02月13日
    浏览(37)
  • centos7使用yum安装gcc8

    cenots7自带的gcc版本为4.8.5,不方便编译一些软件,需要将gcc升级。升级gcc可以通过源码编译安装,也可以通过yum等软件管理工具来进行安装,本文介绍通过yum软件来安装gcc。 2.1 安装scl源 2.2 列出scl可用源下所有可用版本 2.3 安装指定版本的gcc工具链 2.4 使用指定版本的gcc

    2024年02月13日
    浏览(33)
  • 【Docker:Cannot connect to the Docker daemon at unix:///var/run/docker.sock.Is the docker daemon run】

    在后台一直出现xxljob环境的报错,然后查看服务器执行关于docker命令,docker images,docker ps,会一直出现如下问题: 此时已确定Docker本身已经安装正常。 问题原因是因为docker服务没有启动,所以在相应的/var/run/ 路径下找不到docker的进程。 如果未安装docker,则会出现: 1、执行

    2024年02月05日
    浏览(45)
  • windows10 安装Docker Desktop时无法启动“Failed to start the Docker Engine“原因分析

    翻遍了很多网上的相关问题,都没有解决,知道我看到这篇博客,发现安装Docker Desktop需要支持CPU支持二级地址转换(SLAT)。 于是去检查电脑是否支持SLAT,方法来自这一文章。 发现自己电脑不支持SLAT。。。

    2024年02月15日
    浏览(36)

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

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

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

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

二维码1

领取红包

二维码2

领红包