我正在非常非常令人沮丧命令有问题yum
。我认为问题是这样开始的:
我正在运行一个 EC2 服务器。一个微型 EC2 服务器。今天,我通过 SSH 进入服务器,发现有“144 个更新”在等着我。当然,我想,继续吧。
在此过程进行一段时间后,我开始收到这些错误:
error: Couldn't fork %post(openldap-2.4.23-32.21.amzn1.x86_64): Cannot allocate memory
啊哈!我想。内存不够吧?停止我的实例,将其升级为 m1.large 实例(4GiB 内存 vs 613 MiB)。登录后,发现大约有 100 个更新已准备就绪。运行yum update
。
现在我明白了:
像这样开始:
Loaded plugins: priorities, security, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00
amzn-main/primary_db | 2.4 MB 00:00
amzn-updates | 2.3 kB 00:00
amzn-updates/primary_db | 7.8 kB 00:00
Setting up Update Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
--> Running transaction check
---> Package authconfig.x86_64 0:6.1.12-10.16.amzn1 will be updated
---> Package authconfig.x86_64 0:6.1.12-13.17.amzn1 will be an update
然后-->
对每次更新都执行此操作。
完成后,它会执行以下操作:
---> Package javapackages-tools.noarch 0:0.9.1-1.2.amzn1 will be installed
--> Processing Dependency: libxslt for package: javapackages-tools-0.9.1-1.2.amzn1.noarch
---> Package libgcc47.i686 0:4.7.2-8.72.amzn1 will be installed
---> Package numactl.x86_64 0:2.0.7-6.10.amzn1 will be installed
---> Package python-imaging.x86_64 0:1.1.6-19.6.amzn1 will be installed
--> Running transaction check
---> Package libxslt.x86_64 0:1.1.26-2.7.amzn1 will be installed
--> Finished Dependency Resolution
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for libcom_err which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of libcom_err of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude libcom_err.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of libcom_err installed, but
yum can only see an upgrade for one of those arcitectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of libcom_err installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
这样做:
Protected multilib versions: libcom_err-1.42.3-3.17.amzn1.i686 != libcom_err-1.42.3-2.16.amzn1.x86_64
Error: Protected multilib versions: krb5-libs-1.10.3-10.24.amzn1.i686 != krb5-libs-1.9-33.22.amzn1.x86_64
Error: Protected multilib versions: libblkid-2.17.2-13.16.amzn1.i686 != libblkid-2.17.2-13.15.amzn1.x86_64
Error: Protected multilib versions: glibc-2.12-1.107.43.amzn1.i686 != glibc-2.12-1.80.42.amzn1.x86_64
Error: Protected multilib versions: libgpg-error-1.10-3.10.amzn1.i686 != libgpg-error-1.10-1.9.amzn1.x86_64
Error: Protected multilib versions: libgcc47-4.7.2-8.72.amzn1.i686 != libgcc47-4.7.2-2.69.amzn1.x86_64
Error: Protected multilib versions: libuuid-2.17.2-13.16.amzn1.i686 != libuuid-2.17.2-13.15.amzn1.x86_64
Error: Protected multilib versions: libselinux-2.1.10-3.17.amzn1.i686 != libselinux-2.1.6-6.12.amzn1.x86_64
Error: Protected multilib versions: libsepol-2.1.7-3.12.amzn1.i686 != libsepol-2.1.3-2.11.amzn1.x86_64
那么这个……
You could try using --skip-broken to work around the problem
** Found 49 pre-existing rpmdb problem(s), 'yum check' output follows:
apr-util-1.4.1-4.14.amzn1.x86_64 is a duplicate with apr-util-1.4.1-4.13.amzn1.x86_64
apr-util-ldap-1.4.1-4.14.amzn1.x86_64 is a duplicate with apr-util-ldap-1.4.1-4.13.amzn1.x86_64
bash-4.1.2-14.16.amzn1.x86_64 is a duplicate with bash-4.1.2-9.15.amzn1.x86_64
cyrus-sasl-lib-2.1.23-13.10.amzn1.x86_64 is a duplicate with cyrus-sasl-lib-2.1.23-13.9.amzn1.x86_64
device-mapper-1.02.77-9.19.amzn1.x86_64 is a duplicate with device-mapper-1.02.65-6.17.amzn1.x86_64
device-mapper-event-1.02.77-9.19.amzn1.x86_64 is a duplicate with device-mapper-event-1.02.65-6.17.amzn1.x86_64
device-mapper-event-libs-1.02.77-9.19.amzn1.x86_64 is a duplicate with device-mapper-event-libs-1.02.65-6.17.amzn1.x86_64
device-mapper-libs-1.02.77-9.19.amzn1.x86_64 is a duplicate with device-mapper-libs-1.02.65-6.17.amzn1.x86_64
file-5.11-4.12.amzn1.x86_64 is a duplicate with file-5.07-6.11.amzn1.x86_64
file-libs-5.11-4.12.amzn1.x86_64 is a duplicate with file-libs-5.07-6.11.amzn1.x86_64
generic-logos-17.0.0-2.5.amzn1.noarch is a duplicate with generic-logos-16.0.0-1.4.amzn1.noarch
glibc-2.12-1.107.43.amzn1.x86_64 is a duplicate with glibc-2.12-1.80.42.amzn1.x86_64
glibc-common-2.12-1.107.43.amzn1.x86_64 is a duplicate with glibc-common-2.12-1.80.42.amzn1.x86_64
httpd-tools-2.2.24-1.29.amzn1.x86_64 is a duplicate with httpd-tools-2.2.23-1.25.amzn1.x86_64
iproute-3.6.0-6.15.amzn1.x86_64 is a duplicate with iproute-3.3.0-2.10.amzn1.x86_64
iptables-1.4.18-1.16.amzn1.x86_64 is a duplicate with iptables-1.4.12-2.15.amzn1.x86_64
krb5-libs-1.10.3-10.24.amzn1.x86_64 is a duplicate with krb5-libs-1.9-33.22.amzn1.x86_64
libblkid-2.17.2-13.16.amzn1.x86_64 is a duplicate with libblkid-2.17.2-13.15.amzn1.x86_64
libcom_err-1.42.3-3.17.amzn1.x86_64 is a duplicate with libcom_err-1.42.3-2.16.amzn1.x86_64
libgcc47-4.7.2-8.72.amzn1.x86_64 is a duplicate with libgcc47-4.7.2-2.69.amzn1.x86_64
libgpg-error-1.10-3.10.amzn1.x86_64 is a duplicate with libgpg-error-1.10-1.9.amzn1.x86_64
libselinux-2.1.10-3.17.amzn1.x86_64 is a duplicate with libselinux-2.1.6-6.12.amzn1.x86_64
libsepol-2.1.7-3.12.amzn1.x86_64 is a duplicate with libsepol-2.1.3-2.11.amzn1.x86_64
libss-1.42.3-3.17.amzn1.x86_64 is a duplicate with libss-1.42.3-2.16.amzn1.x86_64
libstdc++47-4.7.2-8.72.amzn1.x86_64 is a duplicate with libstdc++47-4.7.2-2.69.amzn1.x86_64
libuuid-2.17.2-13.16.amzn1.x86_64 is a duplicate with libuuid-2.17.2-13.15.amzn1.x86_64
lvm2-libs-2.02.98-9.19.amzn1.x86_64 is a duplicate with lvm2-libs-2.02.86-6.17.amzn1.x86_64
mysql55-common-5.5.30-1.31.amzn1.x86_64 is a duplicate with mysql55-common-5.5.29-1.27.amzn1.x86_64
mysql55-libs-5.5.30-1.31.amzn1.x86_64 is a duplicate with mysql55-libs-5.5.29-1.27.amzn1.x86_64
nspr-4.9.2-1.16.amzn1.x86_64 is a duplicate with nspr-4.9.2-0.15.amzn1.x86_64
nss-3.14.0.0-12.28.amzn1.x86_64 is a duplicate with nss-3.13.6-2.27.amzn1.x86_64
nss-sysinit-3.14.0.0-12.28.amzn1.x86_64 is a duplicate with nss-sysinit-3.13.6-2.27.amzn1.x86_64
nss-tools-3.14.0.0-12.28.amzn1.x86_64 is a duplicate with nss-tools-3.13.6-2.27.amzn1.x86_64
nss-util-3.14.0.0-2.15.amzn1.x86_64 is a duplicate with nss-util-3.13.6-1.14.amzn1.x86_64
openldap-2.4.23-32.21.amzn1.x86_64 is a duplicate with openldap-2.4.23-26.17.amzn1.x86_64
php-cli-5.3.20-1.31.amzn1.x86_64 is a duplicate with php-cli-5.3.20-1.30.amzn1.x86_64
php-common-5.3.20-1.31.amzn1.x86_64 is a duplicate with php-common-5.3.20-1.30.amzn1.x86_64
php-pdo-5.3.20-1.31.amzn1.x86_64 is a duplicate with php-pdo-5.3.20-1.30.amzn1.x86_64
python26-2.6.8-3.32.amzn1.x86_64 is a duplicate with python26-2.6.8-3.30.amzn1.x86_64
python26-libs-2.6.8-3.32.amzn1.x86_64 is a duplicate with python26-libs-2.6.8-3.30.amzn1.x86_64
rpm-4.8.0-32.40.amzn1.x86_64 is a duplicate with rpm-4.8.0-27.39.amzn1.x86_64
rpm-libs-4.8.0-32.40.amzn1.x86_64 is a duplicate with rpm-libs-4.8.0-27.39.amzn1.x86_64
rpm-python-4.8.0-32.40.amzn1.x86_64 is a duplicate with rpm-python-4.8.0-27.39.amzn1.x86_64
setup-2.8.14-20.11.amzn1.noarch is a duplicate with setup-2.8.14-16.10.amzn1.noarch
sudo-1.8.6p3-7.16.amzn1.x86_64 is a duplicate with sudo-1.8.3p1-7.0.amzn1.x86_64
2:tar-1.26-12.13.amzn1.x86_64 is a duplicate with 2:tar-1.23-7.10.amzn1.x86_64
tzdata-2013b-1.17.amzn1.noarch is a duplicate with tzdata-2012f-1.15.amzn1.noarch
util-linux-ng-2.17.2-13.16.amzn1.x86_64 is a duplicate with util-linux-ng-2.17.2-13.15.amzn1.x86_64
yum-3.2.29-40.25.amzn1.noarch is a duplicate with yum-3.2.29-30.24.amzn1.noarch
[root@ip-10-35-73-173 html]#
任何帮助,将不胜感激大大!!!!!
答案1
我发现您的输出中的主要问题是您在之前的 yum 事务完成之前就将其中断了。
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
在尝试安装或更新任何其他内容之前,您确实应该这样做。
yum-complete-transaction
完成后,通过清除本地缓存来排除缓存与存储库不同步的可能问题。
yum clean all
最后,再试一次。
yum update
但是,如果 Amazon 的存储库确实不同步,此操作仍可能会失败。不幸的是,这种情况发生得太频繁了,这是我不推荐使用 Amazon Linux 的主要原因之一。