linux升级安装openssh时出现依赖冲突
通过如下⽅式下载到openssh安装包
-rwxrwxrwx. 1 root root 157200 Jul 210:39 cryptsetup-2.0.3-3.el7.x86_64.rpm
-rwxrwxrwx. 1 root root 345964 Jul 210:39 cryptsetup-libs-2.0.3-3.el7.x86_64.rpm
-rwxrwxrwx. 1 root root 98680 Jul 210:39 libgudev1-219-62.el7_6.6.x86_64.rpm
-rwxrwxrwx. 1 root root 165932 Jul 210:39 libselinux-2.5-14.1.el7.x86_64.rpm
-rwxrwxrwx. 1 root root 191104 Jul 210:39 libselinux-devel-2.5-14.1.el7.x86_64.rpm
-rwxrwxrwx. 1 root root 241132 Jul 210:39 libselinux-python-2.5-14.1.el7.x86_64.rpm
-rwxrwxrwx. 1 root root 155092 Jul 210:39 libselinux-utils-2.5-14.1.el7.x86_64.rpm
-rwxrwxrwx. 1 root root 154244 Jul 210:39 libsemanage-2.5-14.el7.x86_64.rpm
在linux中下载mysql时冲突是什么-rwxrwxrwx. 1 root root 304196 Jul 210:39 libsepol-2.5-10.el7.x86_64.rpm
-
rwxrwxrwx. 1 root root 78740 Jul 210:39 libsepol-devel-2.5-10.el7.x86_64.rpm
-rwxrwxrwx. 1 root root 100668 Jul 210:39 lz4-1.7.5-2.el7.x86_64.rpm
-rwxrwxrwx. 1 root root 522344 Jul 210:39 openssh-7.4p1-16.el7.x86_64.rpm
-rwxrwxrwx. 1 root root 670336 Jul 210:39 openssh-clients-7.4p1-16.el7.x86_64.rpm
-rwxrwxrwx. 1 root root 469340 Jul 210:39 openssh-server-7.4p1-16.el7.x86_64.rpm
-rwxrwxrwx. 1 root root 938004 Jul 210:39 policycoreutils-2.5-29.el7_6.1.x86_64.rpm
-rwxrwxrwx. 1 root root 495512 Jul 210:39 selinux-policy-3.13.1-229.el7_arch.rpm
-rwxrwxrwx. 1 root root 7247400 Jul 210:39 selinux-policy-targeted-3.13.1-229.el7_arch.rpm
-rwxrwxrwx. 1 root root 5299428 Jul 210:39 systemd-219-62.el7_6.6.x86_64.rpm
-rwxrwxrwx. 1 root root 416428 Jul 210:39 systemd-libs-219-62.el7_6.6.x86_64.rpm
-rwxrwxrwx. 1 root root 135760 Jul 210:39 systemd-python-219-62.el7_6.6.x86_64.rpm
-
rwxrwxrwx. 1 root root 85736 Jul 210:39 systemd-sysv-219-62.el7_6.6.x86_64.rpm
安装的时候出现如下异常
[root@localhost openssh74pl]# rpm -ivh ./*.rpm
error: Failed dependencies:
selinux-policy-base < 3.13.1-66 conflicts with libselinux-2.5-14.1.el7.x86_64
systemd < 219-20 conflicts with libselinux-2.5-14.1.el7.x86_64
selinux-policy-base < 3.13.1-66 conflicts with libsemanage-2.5-14.el7.x86_64
selinux-policy < 3.13.1-92 conflicts with openssh-7.4p1-16.el7.x86_64
上述信息中,with后⾯为即将要安装的软件,开头为当前已经安装过的软件,查询已安装的selinux安装包
[root@localhost openssh74pl]# yum list installed | grep selinux-policy
版本为3.13.1-60.e17,确实低于3.13.1-66版本,⽽下载下来的安装包中包含3.13.1-229.el7的版本,满⾜要求的,但由于之前已经安装了低版本的软件,在安装其他依赖该低版本软件时,就会出现上述冲突。
有⼀种⽐较简洁的⽅法,就是添加上两个参数--force和--nodeps。由于通过yum downloadonly下载了完整的包,那在当前版本的CentOS 中,将这些包全部安装,就能正常升级openssh,所以也不需要逐个依赖依次安装,或者先卸载之前版本在安装。
rpm -ivh ./openssh74pl/*.rpm --force --nodeps
-- force 强制安装/卸载
--nodeps 安装/卸载时不检查依赖关系
安装完成后,验证openssh升级到了7.4版本
[root@localhost bugfix]# ssh -V
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论