yum异常

yum最新缓存

yum clean all
yum makecache
yum repolist

yum repolist为0,yum list正常

  1. cd /etc/yum.repos.d
  2. mv CentOS-Base.repo CentOS-Base.repo.bak
  3. 下载 repo文件
  4. 使用xftp上传
  5. 生成缓存

yum clean all
yum makecache
yum repolist

  1. 替换阿里云repo

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

终止安装过程

ctrl + z             // 中断当前安装,比如 yum install XXX
ps -ef|grep yum      // 查找当前yum相关的进程  yum install XXX对应的pid
kill -9  进程号(pid)  // 杀掉进程   

安装netstat

显示各种网络相关信息,如网络连接,路由表,接口状态 (Interface Statistics),masquerade 连接,多播成员 (Multicast Memberships) 等等。

yum -y install net-tools

安装gcc相关

yum -y install gcc gcc-c++ libstdc++-devel

posted @ 2021-02-18 11:10  wesson2019  阅读(87)  评论(0编辑  收藏  举报