Linux执行YUM命令报错解决方案

Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package subversion available.
Nothing to do

红帽中出现"This system is not registered with RHN"这个的原因是因为红帽中没有注册RHN。

解决办法:(假定你已安装yum,且网络畅通)更改yum的源,
即更换/etc/yum.repos.d/rhel-debuginfo.repo 这个文件。首先备份,如下所示:

[[email protected] yum.repos.d]# ls /etc/yum.repos.d/
 rhel-debuginfo.repo.bak

进入/etc/yum.repos.d/目录,终端中输入

wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

再看目下有什么文件:

[[email protected] yum.repos.d]# ls /etc/yum.repos.d/
CentOS-Base.repo  rhel-debuginfo.repo.bak

即可在此目录下得到CentOS-Base.repo文件,这是centos的源文件,然后测试看看yum是否可以使用了,
如果还是不可以的话,只需将其重命名为rhel-debuginfo.repo即可。

原文地址:https://www.cnblogs.com/fighter007/p/10771791.html

时间: 2024-08-11 07:41:52

Linux执行YUM命令报错解决方案的相关文章

执行 maven 命令 报错Unable to add module to the current project as it is not of packaging type 'pom'[转]

今天学习在本地搭建Maven工程时,执行了mvn archetype:generate 命令,报错. Unable to create project from archetype [org.apache.maven.archetypes:maven-archetype-quickstart:1.1] Unable to add module to the current project as it is not of packaging type 'pom' 上网搜资料发现一个帖子,问题解决:

树莓派(Raspberry Pi 3) centos7使用yum命令报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:

使用yum命令报错 File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: ^SyntaxError: invalid syntax 问题如下:  问题出现原因: yum包管理是使用python2.x写的,将python2.x升级到python3.x以后,由于python版本语法兼容性导致问题出现 解决办法: 修改yum配置文件,将python版本指向以前的旧版本 # vi /usr/bin/yum #!/usr/bin/py

<问题解决01>Linux虚拟机使用命令yum install 报错--解决方案如下:

问题描述: Linux虚拟机上使用yum install命令报错,错误为:Determining IP information for eth0- failed; no link present. eth0 解决方案: 解决方案来源博客地址:http://blog.csdn.net/refuil/article/details/50771677 根本原因是,win7物理机的两个服务没有启动,如果是这样,可以做如下修改: 开始-控制面板-管理工具-服务,找到VMwareDHCP Service和V

191016 Linux中python2升级到python3导致yum命令报错

因为python2到python3的升级,导致使用yum相关的命令时报错: 报错一: command not found... 方案:修改/usr/bin/yum文件的第一行,将结尾的python改成python27(或python2.7),请自行尝试,修改后能查询yum版本即可: 报错二:cannot retrieve matalink for repository:epel/x86... 方案:sed -i ‘s#https://#http://#g' /etc/yum.repos.d/ep

使用yum命令报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: SyntaxError: invalid syntax问题

背景: CentOS 7升级Python到3.6.2后,需要在/usr/bin/python创建了一个指向Python 3的软连接,然后将/usr/bin/yum的顶部的: !/usr/bin/python 遇到的问题报错如下: File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: 通过看报错可以了解到是使用了python2的语法,所以了解到当前yum使用的Python2,因为我单独安装了python3,且python3设置

关于ubuntu上执行错误命令报错

Sorry, command-not-found has crashed! 新安装了一台ubuntu server 安装时用中文安装的,之后命令行下各种乱码,最后也不知道是修改哪里造成的 每次执行一次错误的命令就会报错:(报错信息如下) Sorry, command-not-found has crashed! Please file a bug report at:https://bugs.launchpad.net/command-not-found/+filebugPlease inclu

使用yum命令报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:

背景: yum包的管理是使用python写的,有对应的python版本 遇到的问题报错如下: File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: 通过看报错可以了解到是使用了python2的语法,所以了解到当前yum使用的Python2,因为我单独安装了python3,且python3设置为默认版本了,所以导致语法问题 解决方法: 使用python2.6 yum install xxx来使用yum命令 注意:python2

安装atlas后执行hive命令报错

在集群中安装atlas,在安装atlas的节点上执行hive -e "show databases;" 正常,但是在集群中其他节点上执行hive -e "show databases;" 命令报如下错误 一.分析 在安装atlas节点上和没有安装atlas的节点上分别再次执行hive --hiveconf hive.root.logger=DEBUG,console -e "show databases;" 命令,获取执行日志,比较日志看看是否什

Jenkins中执行docker命令报错

Cannot connect to the Docker daemon. Is the docker daemon running on this host? @(Jenkins) ? 在配置Jenkins从Gitlab自动构建Dockerfile上传至Harbor时遇到了上述问题,jenkins中执行docker命令会有上述报错,查阅相关资料后发现解决办法如下: 一.修改Docker服务配置 systemctl stop docker sudo gpasswd -a jenkins docke