问题现象:
通过命令(yum update –exclude=kernel* –exclude=centos-release*)升级时发生错误无法操作,报错如下:
[root@localhost ~]# yum update --exclude=kernel* --exclude=centos-release* Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.cn99.com * updates: mirrors.cn99.com Resolving Dependencies --> Running transaction check ---> Package NetworkManager.x86_64 1:1.8.0-9.el7 will be updated ---> Package NetworkManager.x86_64 1:1.10.2-13.el7 will be an update ......此处省略...... --> Running transaction check ---> Package lz4.x86_64 0:1.7.5-2.el7 will be installed --> Processing Conflict: initscripts-9.49.41-1.el7.x86_64 conflicts redhat-release < 7.5-0.11 --> Finished Dependency Resolution Error: initscripts conflicts with centos-release-7-4.1708.el7.centos.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
解决方法:
通过报错提示Error: initscripts conflicts with centos-release-7-4.1708.el7.centos.x86_64 意思是相冲突了,既然冲突就排除掉;定位到错误关键词为initscripts;
[root@localhost ~]# yum update --exclude=kernel* --exclude=centos-release* --exclude=initscripts*
此命令(yum update –exclude=kernel* –exclude=centos-release* –exclude=initscripts*)模式下升级方可正常