VPS yum 更新文件系统...已终止

VPS yum 更新文件系统...已终止

我有一个 HostGator 1 级 VPS - 基本上是一个 CentOS 5。我有完全的 root 权限来运行我想要的任何程序。

无论如何,在最近的一次维护检查期间,我运行了yum -y update,但是在出现常见的 Yum 消息后,它在“运行事务测试”后失败,并显示一条消息“已终止”。

据人们称这里,问题特定于某个软件包,因此我开始单独更新每个软件包 ( yum install packagename)。这帮助我确定了主要问题;导致问题的是软件包“filesystem”。

以下是完整的 CLI 转储:

[root@cov ~]# yum -v update filesystem
Loading "fastestmirror" plugin
Config time: 0.109
Yum Version: 3.2.22
Setting up Package Sacks
Loading mirror speeds from cached hostfile
 * base: mirror.nexcess.net
 * epel: mirror.utexas.edu
 * extras: mirrors.adams.net
 * ius: pancks.sothatswhy.org.uk
 * rpmforge: fr2.rpmfind.net
 * updates: mirror.raystedman.net
pkgsack time: 0.077
rpmdb time: 0.000
Setting up Update Process
Building updates object
up:Obs Init time: 0.629
up:simple updates time: 0.170
up:obs time: 0.006
up:condense time: 0.000
updates time: 3.142
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
--> Running transaction check
Checking deps for filesystem.x86_64 0-2.4.0-3.el5 - None
---> Package filesystem.x86_64 0:2.4.0-3.el5.centos set to be updated
Checking deps for filesystem.x86_64 0-2.4.0-3.el5.centos - u
--> Finished Dependency Resolution
Dependency Process ending
Depsolve time: 0.650

Dependencies Resolved

==========================================================================
 Package          Arch          Version               Repository   Size
==========================================================================
Updating:
 filesystem      x86_64         2.4.0-3.el5.centos    updates      1.0 M

Transaction Summary
==========================================================================
Install       0 Package(s)
Upgrade       1 Package(s)

Total size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
using local copy of filesystem-2.4.0-3.el5.centos.x86_64
Running rpm_check_debug
Member: filesystem.x86_64 0-2.4.0-3.el5.centos - u
Adding Package filesystem-2.4.0-3.el5.centos.x86_64 in mode u
Member: filesystem.x86_64 0-2.4.0-3.el5 - None
rpm_check_debug time: 0.213
Running Transaction Test
Member: filesystem.x86_64 0-2.4.0-3.el5.centos - u
Adding Package filesystem-2.4.0-3.el5.centos.x86_64 in mode u
Member: filesystem.x86_64 0-2.4.0-3.el5 - None
Killed
[root@cov ~]#

注意: yum-complete-transaction一点帮助都没有。

编辑1:正如@BMDMan 建议的那样:

[root@cov ~]# wget ftp://ftp.muug.mb.ca/mirror/centos/5.6/updates/x86_64/RPMS/filesystem-2.4.0-3.el5.centos.x86_64.rpm
--2011-05-16 18:00:40--  ftp://ftp.muug.mb.ca/mirror/centos/5.6/updates/x86_64/RPMS/filesystem-2.4.0-3.el5.centos.x86_64.rpm
           => `filesystem-2.4.0-3.el5.centos.x86_64.rpm'
Resolving ftp.muug.mb.ca... 130.179.31.46
Connecting to ftp.muug.mb.ca|130.179.31.46|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /mirror/centos/5.6/updates/x86_64/RPMS ... done.
==> SIZE filesystem-2.4.0-3.el5.centos.x86_64.rpm ... 1038514
==> PASV ... done.    ==> RETR filesystem-2.4.0-3.el5.centos.x86_64.rpm ... done.
Length: 1038514 (1014K)

100%[============================================================>] 1,038,514   58.2K/s   in 82s

2011-05-16 18:02:03 (12.4 KB/s) - `filesystem-2.4.0-3.el5.centos.x86_64.rpm' saved [1038514]

[root@cov ~]# rpm -Uvh filesystem-2.4.0-3.el5.centos.x86_64.rpm
Preparing...                Killed

编辑2:我在尝试更新时一直在监控交换、CPU 和内存htop,每个仪表都飞到了最大值、最大内存、最大 CPU 和最大交换。这是正常的吗?另外,我的内存目前为 384mb,可能是 RPM 不喜欢这么低的内存?

编辑3:我有一个主意,我停用了很多 Web 服务(邮件、http、mysql 和 dropbox 守护程序),然后再次尝试 RPM。这次它没有被杀死(还没有?),但它似乎卡住了,如下所示:

[root@cov ~]# rpm -Uvh filesystem-2.4.0-3.el5.centos.x86_64.rpm
Preparing...                ########################################### [100%]
   1:filesystem             ########################################### [100%]

编辑4:嗯,看起来卡住了,30 分钟内一动不动。

答案1

该问题确实与内存有关。

我已经说服 HostGator 在他们yum update自行运行期间暂时增加内存,现在这个问题已经解决了。

答案2

临时创建一个 Linux 交换文件,1GB 足够用于“yum update -y” https://linuxize.com/post/create-a-linux-swap-file/

相关内容