Thank you for reading this post, don't forget to subscribe!
Используйте плагин versionlock для защиты пакетов от обновления в операционной системе CentOS.
Установите плагин Yum versionlock.
YAML
1 |
$ yum install yum-plugin-versionlock |
Список заблокированных пакетов.
YAML
1 |
$ yum versionlock list |
YAML
1 2 |
Loaded plugins: fastestmirror, versionlock versionlock list done |
Список доступных обновлений.
YAML
1 |
$ yum check-update |
YAML
1 2 3 4 5 6 7 8 9 10 11 |
Loaded plugins: fastestmirror, versionlock Loading mirror speeds from cached hostfile * base: ftp.icm.edu.pl * extras: ftp.man.poznan.pl * updates: ftp.icm.edu.pl libwbclient.x86_64 4.10.16-7.el7_9 updates samba-client-libs.x86_64 4.10.16-7.el7_9 updates samba-common.noarch 4.10.16-7.el7_9 updates samba-common-libs.x86_64 4.10.16-7.el7_9 updates samba-libs.x86_64 4.10.16-7.el7_9 updates |
Заблокируем пакеты samba- *.
YAML
1 |
$ yum versionlock samba-* |
YAML
1 2 3 4 5 6 |
Loaded plugins: fastestmirror, versionlock Adding versionlock on: 0:samba-common-libs-4.10.4-10.el7 Adding versionlock on: 0:samba-client-libs-4.10.4-10.el7 Adding versionlock on: 0:samba-libs-4.10.4-10.el7 Adding versionlock on: 0:samba-common-4.10.4-10.el7 versionlock added: 4 |
Список заблокированных пакетов.
YAML
1 |
$ yum versionlock list |
YAML
1 2 3 4 5 6 |
Loaded plugins: fastestmirror, versionlock 0:samba-common-libs-4.10.4-10.el7.* 0:samba-client-libs-4.10.4-10.el7.* 0:samba-libs-4.10.4-10.el7.* 0:samba-common-4.10.4-10.el7.* versionlock list done |
Выполним процесс обновления.
YAML
1 |
$ yum upgrade |
YAML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
Loaded plugins: fastestmirror, versionlock Loading mirror speeds from cached hostfile * base: ftp.icm.edu.pl * extras: ftp.icm.edu.pl * updates: ftp.icm.edu.pl Excluding 4 updates due to versionlock (use "yum versionlock status" to show them) Resolving Dependencies --> Running transaction check ---> Package libwbclient.x86_64 0:4.10.4-10.el7 will be updated --> Processing Dependency: libwbclient = 4.10.4-10.el7 for package: samba-common-libs-4.10.4-10.el7.x86_64 --> Processing Dependency: libwbclient = 4.10.4-10.el7 for package: samba-client-libs-4.10.4-10.el7.x86_64 --> Processing Dependency: libwbclient = 4.10.4-10.el7 for package: samba-libs-4.10.4-10.el7.x86_64 ---> Package libwbclient.x86_64 0:4.10.16-7.el7_9 will be an update --> Processing Dependency: samba-client-libs = 4.10.16-7.el7_9 for package: libwbclient-4.10.16-7.el7_9.x86_64 --> Processing Dependency: libreplace-samba4.so(SAMBA_4.10.16)(64bit) for package: libwbclient-4.10.16-7.el7_9.x86_64 --> Finished Dependency Resolution Error: Package: samba-libs-4.10.4-10.el7.x86_64 (@anaconda) Requires: libwbclient = 4.10.4-10.el7 Removing: libwbclient-4.10.4-10.el7.x86_64 (@anaconda) libwbclient = 4.10.4-10.el7 Updated By: libwbclient-4.10.16-7.el7_9.x86_64 (updates) libwbclient = 4.10.16-7.el7_9 Available: libwbclient-4.10.16-5.el7.i686 (base) libwbclient = 4.10.16-5.el7 Error: Package: samba-client-libs-4.10.4-10.el7.x86_64 (@anaconda) Requires: libwbclient = 4.10.4-10.el7 Removing: libwbclient-4.10.4-10.el7.x86_64 (@anaconda) libwbclient = 4.10.4-10.el7 Updated By: libwbclient-4.10.16-7.el7_9.x86_64 (updates) libwbclient = 4.10.16-7.el7_9 Available: libwbclient-4.10.16-5.el7.i686 (base) libwbclient = 4.10.16-5.el7 Error: Package: libwbclient-4.10.16-7.el7_9.x86_64 (updates) Requires: samba-client-libs = 4.10.16-7.el7_9 Installed: samba-client-libs-4.10.4-10.el7.x86_64 (@anaconda) samba-client-libs = 4.10.4-10.el7 Error: Package: samba-common-libs-4.10.4-10.el7.x86_64 (@anaconda) Requires: libwbclient = 4.10.4-10.el7 Removing: libwbclient-4.10.4-10.el7.x86_64 (@anaconda) libwbclient = 4.10.4-10.el7 Updated By: libwbclient-4.10.16-7.el7_9.x86_64 (updates) libwbclient = 4.10.16-7.el7_9 Available: libwbclient-4.10.16-5.el7.i686 (base) libwbclient = 4.10.16-5.el7 Error: Package: libwbclient-4.10.16-7.el7_9.x86_64 (updates) Requires: libwbclient = 4.10.4-10.el7 Removing: libwbclient-4.10.4-10.el7.x86_64 (@anaconda) libwbclient = 4.10.4-10.el7 Updated By: libwbclient-4.10.16-7.el7_9.x86_64 (updates) libwbclient = 4.10.16-7.el7_9 Available: libwbclient-4.10.16-5.el7.i686 (base) libwbclient = 4.10.16-5.el7 Error: Package: libwbclient-4.10.16-7.el7_9.x86_64 (updates) Requires: libreplace-samba4.so(SAMBA_4.10.16)(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest [vagrant@debian ~]$ yum check-update Loaded plugins: fastestmirror, versionlock Loading mirror speeds from cached hostfile * base: ftp.icm.edu.pl * extras: ftp.man.poznan.pl * updates: ftp.icm.edu.pl Excluding 4 updates due to versionlock (use "yum versionlock status" to show them) libwbclient.x86_64 4.10.16-7.el7_9 updates |
Похоже, libwbclient тоже нужно заблокировать.
YAML
1 |
$ yum versionlock libwbclient |
YAML
1 2 3 |
Loaded plugins: fastestmirror, versionlock Adding versionlock on: 0:libwbclient-4.10.4-10.el7 versionlock added: 1 |
Список заблокированных пакетов.
YAML
1 |
$ yum versionlock list |
YAML
1 2 3 4 5 6 7 |
Loaded plugins: fastestmirror, versionlock 0:samba-common-libs-4.10.4-10.el7.* 0:samba-client-libs-4.10.4-10.el7.* 0:samba-libs-4.10.4-10.el7.* 0:samba-common-4.10.4-10.el7.* 0:libwbclient-4.10.4-10.el7.* versionlock list done |
Список доступных обновлений.
YAML
1 |
$ yum check-update |
YAML
1 2 3 4 5 6 |
Loaded plugins: fastestmirror, versionlock Loading mirror speeds from cached hostfile * base: ftp.icm.edu.pl * extras: ftp.man.poznan.pl * updates: ftp.icm.edu.pl Excluding 5 updates due to versionlock (use "yum versionlock status" to show them) |
Выполним процесс обновления.
YAML
1 |
$ yum upgrade |
YAML
1 2 3 4 5 6 7 |
Loaded plugins: fastestmirror, versionlock Loading mirror speeds from cached hostfile * base: ftp.icm.edu.pl * extras: ftp.icm.edu.pl * updates: ftp.icm.edu.pl Excluding 5 updates due to versionlock (use "yum versionlock status" to show them) No packages marked for update |
Очистим базу данных versionlock:
YAML
1 |
$ yum versionlock clear |
YAML
1 2 |
Loaded plugins: fastestmirror, versionlock versionlock cleared |
Список доступных обновлений.
YAML
1 |
$ yum check-update |
YAML
1 2 3 4 5 6 7 8 9 10 11 |
Loaded plugins: fastestmirror, versionlock Loading mirror speeds from cached hostfile * base: ftp.icm.edu.pl * extras: ftp.man.poznan.pl * updates: ftp.icm.edu.pl libwbclient.x86_64 4.10.16-7.el7_9 updates samba-client-libs.x86_64 4.10.16-7.el7_9 updates samba-common.noarch 4.10.16-7.el7_9 updates samba-common-libs.x86_64 4.10.16-7.el7_9 updates samba-libs.x86_64 4.10.16-7.el7_9 updates |
Вы можете удалить одну запись в случае ошибки.
YAML
1 |
$ yum versionlock delete libwbclient |
YAML
1 2 3 |
Loaded plugins: fastestmirror, versionlock Deleting versionlock for: 0:libwbclient-4.10.4-10.el7.* versionlock deleted: 1 |