更新openssh-server的yum错误

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了更新openssh-server的yum错误相关的知识,希望对你有一定的参考价值。

我试图在Centos 7.4服务器上运行该命令:

yum update openessh-server

但是,我收到以下错误:

Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
openssh-server-7.4p1-13.el7_4.x86_64.rpm                                                                      | 458 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : openssh-server-7.4p1-13.el7_4.x86_64                                                                              1/2 
Error unpacking rpm package openssh-server-7.4p1-13.el7_4.x86_64
warning: /etc/ssh/sshd_config created as /etc/ssh/sshd_config.rpmnew
error: unpacking of archive failed on file /usr/sbin/sshd: cpio: rename
  Verifying  : openssh-server-7.4p1-13.el7_4.x86_64                                                                              1/2 
openssh-server-6.6.1p1-35.el7_3.x86_64 was supposed to be removed but is not!
  Verifying  : openssh-server-6.6.1p1-35.el7_3.x86_64                                                                            2/2 

Failed:
  openssh-server.x86_64 0:6.6.1p1-35.el7_3                           openssh-server.x86_64 0:7.4p1-13.el7_4 

uname -a

Linux XXXXXX 3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

yum repolist

repo id                                     repo name                                                                          status
base/7/x86_64                               CentOS-7 - Base                                                                     9,591
centosplus/7/x86_64                         CentOS-7 - Plus                                                                        63
epel/x86_64                                 Extra Packages for Enterprise Linux 7 - x86_64                                     12,155
epel-debuginfo/x86_64                       Extra Packages for Enterprise Linux 7 - x86_64 - Debug                              2,694
extras/7/x86_64                             CentOS-7 - Extras                                                                     327
remi                                        Les RPM de remi pour Enterprise Linux 7 - x86_64                                    4,548
remi-php56                                  Les RPM de remi de PHP 5.6 pour Enterprise Linux 7 - x86_64                           415
remi-safe                                   Safe Remi's RPM repository for Enterprise Linux 7 - x86_64                          2,578
updates/7/x86_64                            CentOS-7 - Updates                                                                  1,573
repolist: 33,944

我的直觉是清除缓存并重建rpm db,执行包清理,删除openssh-server,然后安装openssh-server。我还没有这样做的原因是因为我害怕破解SSH,这就是我访问服务器的方式。我想知道是否有人可以提供一些建议,因为我在yum / rpm错误方面不是很有经验。我也很乐意在需要时提供更多信息来更新问题,因为我不确定要包括哪些内容。

答案

所以对我有用的解决方案是:

yum clean all
yum remove openssh-server
yum install openssh-server

我从控制台这样做是为了保存,但事实证明它通过SSH可以正常工作。

以上是关于更新openssh-server的yum错误的主要内容,如果未能解决你的问题,请参考以下文章

openssh-server启动错误解决

linux安装插件大全

yum install ,更新在centos 6.6中返回404错误

解决Centos yum 更新出错

yum第三方安装-软件包没签名及更新错误

错误:下列软件包有未满足的依赖关系: openssh-server : 依赖: openssh-client (= 1:7.1p1-4)