关于使用Centos 7做linux网络服务与应用的一些常见错误及解决方法(仅个人做法)

时间:2024-04-06 20:37:08

关于使用Centos 7做linux网络服务与应用的一些常见错误及解决方法(仅个人做法)

1.当清理缓存yum缓存并重新生成时

使用命令yum clean all,出现了如图
关于使用Centos 7做linux网络服务与应用的一些常见错误及解决方法(仅个人做法)
已加载插件:fastestmirror, langpacks
Repository base is listed more than once in the configuration
/var/run/yum.pid 已被锁定,PID 为 13488 的另一个程序正在运行。
Another app is currently holding the yum lock; waiting for it to exit…
另一个应用程序是:PackageKit
内存:180 M RSS (1.5 GB VSZ)
已启动: Fri Apr 10 18:13:19 2020 - 08:18之前
状态 :睡眠中,进程ID:13488
Another app is currently holding the yum lock; waiting for it to exit…
另一个应用程序是:PackageKit
内存:182 M RSS (1.5 GB VSZ)
已启动: Fri Apr 10 18:13:19 2020 - 08:20之前
状态 :睡眠中,进程ID:13488
Another app is currently holding the yum lock; waiting for it to exit…
另一个应用程序是:PackageKit
内存:182 M RSS (1.5 GB VSZ)
已启动: Fri Apr 10 18:13:19 2020 - 08:22之前
状态 :睡眠中,进程ID:13488
Another app is currently holding the yum lock; waiting for it to exit…
另一个应用程序是:PackageKit
内存:182 M RSS (1.5 GB VSZ)
已启动: Fri Apr 10 18:13:19 2020 - 08:24之前
状态 :睡眠中,进程ID:13488
。。。。无限循环,必须Ctrl c才能结束,一度让我十分头秃
后来发现只要删除/var/run/yum.pid就可以正常使用
附上命令rm -rf /var/run/yum.pid
之后就可以正常使用啦

2.E37: No write since last change (add ! to override)

出现这个可能是权限不够,使用命令:w!强制存盘即可

3.重启网络服务systemctl restart network

报错:Job for network.service failed. See ‘systemctl status network.service’ and ‘journalctl -xn’ for details.
可能是网络服务关闭,在任务管理器中,点击服务
关于使用Centos 7做linux网络服务与应用的一些常见错误及解决方法(仅个人做法)检查VM的DHCP服务有没有开启,如果没有,设置运行