1、基本问题所在–yum
使用yum下载时:
yum install -y gcc gcc-c++
出现问题
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register
没有注册,那换一个不收费的源
1、切换到 root 用户,键入su
,然后输入密码
su
2、使用 rpm 命令删除当前系统上的yum命令:
rpm -e --nodeps yum
3、查看系统版本,用uname -a
和cat /etc/redhat-release
这两条条命令
显示是8.0,可以用centos的8
[root@linuxprobe w]# uname -a
Linux linuxprobe.com 4.18.0-80.el8.x86_64
#1 SMP Wed Mar 13 12:02:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[root@linuxprobe w]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.0 (Ootpa)
4、使用 rpm -qa|grep yum 查看已经安装的yum包