通过yum update 升级报错 Error: initscripts conflicts with centos-release-7-4.1708.el7.centos.x86_64 解决方法

通过yum update 升级报错 Error: initscripts conflicts with centos-release-7-4.1708.el7.centos.x86_64 解决方法

[root@localhost ~]# yum update
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

......此处省略......

--> 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

编译 vi /et/yum.conf

# PUT YOUR REPOS HERE OR IN separate files named file.repo                                               
# in /etc/yum.repos.d                                                                                    
#exclude=centos-release*                                                                                 
#exclude=kernel* centos-release*     -------------- > 这条注释掉