Close

centos ошибка unfinished transactions remaining

При установке необходимого пакета вылезло сообщение:

There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.

Это говорит что при предыдущей установке чего либо, есть не завершенные операции.
Решение написано в сообщении (пишем в консоли):

yum install yum-utils
и затем

yum-complete-transaction
Однако в ответ получили сообщение (или подобное):

…..
—> Finished Dependency Resolution
Error: Trying to remove «yum», which is protected
You could try using —skip-broken to work around the problem
** Found 163 pre-existing rpmdb problem(s), ‘yum check’ output follows:
ModemManager-0.4.0-5.git20100628.el6.x86_64 is a duplicate with ModemManager-0.4.0-3.git20100628.el6.x86_64
1:NetworkManager-0.8.1-66.el6.x86_64 is a duplicate with 1:NetworkManager-0.8.1-43.el6.x86_64
1:NetworkManager-glib-0.8.1-66.el6.x86_64 is a duplicate with 1:NetworkManager-glib-0.8.1-43.el6.x86_64
1:NetworkManager-gnome-0.8.1-66.el6.x86_64 is a duplicate with 1:NetworkManager-gnome-0.8.1-43.el6.x86_64
atk-1.30.0-1.el6.x86_64 is a duplicate with atk-1.28.0-2.el6.x86_64
bash-4.1.2-15.el6_4.x86_64 is a duplicate with bash-4.1.2-14.el6.x86_64
ca-certificates-2013.1.94-65.0.el6.noarch is a duplicate with ca-certificates-2010.63-3.el6_1.5.noarch
…..
sysvinit-tools-2.87-5.dsf.el6.x86_64 is a duplicate with sysvinit-tools-2.87-4.dsf.el6.x86_64
talk-server-0.17-36.el6.x86_64 is a duplicate with talk-server-0.17-34.el6.x86_64
tzdata-2013g-1.el6.noarch is a duplicate with tzdata-2013c-2.el6.noarch
udev-147-2.51.el6.x86_64 is a duplicate with udev-147-2.46.el6.x86_64
unbound-libs-1.4.21-1.el6.x86_64 is a duplicate with unbound-libs-1.4.19-1.el6.x86_64
…..
Останавливаем сервисы (чтобы не мешались):

service nginx stop
service httpd stop
service mysqld stop
Команда yum update показывает такой результат:

…..
—> 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 libxml2 which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of libxml2 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 libxml2.otherarch … this should give you an error
message showing the root cause of the problem.

2. You have multiple architectures of libxml2 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 libxml2 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: libxml2-2.7.6-14.el6.x86_64 != libxml2-2.7.6-12.el6_4.1.x86_64
Error: Protected multilib versions: libxml2-2.7.6-14.el6.x86_64 != libxml2-2.7.6-12.el6_4.1.i686
You could try using —skip-broken to work around the problem
** Found 163 pre-existing rpmdb problem(s), ‘yum check’ output follows:
…..
Удаляем устаревшие пакеты:

package-cleanup —cleandupes
…..
—> Running transaction check
—> Package ModemManager.x86_64 0:0.4.0-3.git20100628.el6 will be erased
—> Package NetworkManager-glib.x86_64 1:0.8.1-43.el6 will be erased
—> Package atk.x86_64 0:1.28.0-2.el6 will be erased
—> Package bash.x86_64 0:4.1.2-14.el6 will be erased
…..
—> Package xorg-x11-server-Xorg.x86_64 0:1.13.0-11.el6.centos will be erased
—> Package xorg-x11-server-common.x86_64 0:1.13.0-11.el6.centos will be erased
—> Package xorg-x11-xinit.x86_64 0:1.0.9-13.el6 will be erased
—> Package xulrunner.x86_64 0:17.0.7-1.el6.centos will be erased
…..
Проверяем yum-complete-transaction

…..
—> Finished Dependency Resolution
Error: Trying to remove «yum», which is protected
You could try using —skip-broken to work around the problem
** Found 9 pre-existing rpmdb problem(s), ‘yum check’ output follows:
db4-4.7.25-18.el6_4.x86_64 is a duplicate with db4-4.7.25-17.el6.i686
glib2-2.26.1-3.el6.x86_64 is a duplicate with glib2-2.22.5-7.el6.i686
kernel-firmware-2.6.32-431.el6.noarch is a duplicate with kernel-firmware-2.6.32-358.18.1.el6.noarch
kernel-headers-2.6.32-431.el6.x86_64 is a duplicate with kernel-headers-2.6.32-358.18.1.el6.x86_64
…..
package-cleanup —cleandupes уже не находит проблем

No duplicates to remove
Запускаем yum update, ругани на protected пакеты уже нет, спокойно обновляем

…..
—> Running transaction check
—> Package ca-certificates.noarch 0:2013.1.94-65.0.el6 will be updated
—> Package ca-certificates.noarch 0:2013.1.95-65.1.el6_5 will be an update
—> Package cvs.x86_64 0:1.11.23-15.el6 will be updated
—> Package cvs.x86_64 0:1.11.23-16.el6 will be an update
—> Package db4.i686 0:4.7.25-17.el6 will be updated
—> Package db4.i686 0:4.7.25-18.el6_4 will be an update
—> Package fail2ban.noarch 0:0.8.10-3.el6 will be updated
…..
Complete!
Снова проверяем yum-complete-transaction, ошибки уже не вываливаются

…..
—> Running transaction check
—> Package e2fsprogs-libs.i686 0:1.41.12-18.el6 will be installed
—> Package nscd.x86_64 0:2.12-1.132.el6 will be installed
—> Package ntsysv.x86_64 0:1.3.49.3-2.el6_4.1 will be installed
—> Package perl-CGI.x86_64 0:3.51-136.el6 will be installed
—> Package perl-Time-HiRes.x86_64 4:1.9721-136.el6 will be installed
—> Finished Dependency Resolution

Dependencies Resolved
…..
Complete!
Cleaning up completed transaction file
Еще раз проверяем пакеты и зависимости:

package-cleanup —problems
#No Problems Found
package-cleanup —cleandupes
#No duplicates to remove
Запускаем сервисы:

service mysqld start
service httpd start
service nginx start