Несоответствующие зависимости при попытке установить openssh на Debian 12.

Вопрос или проблема

Недавно я получил сообщение типа «Следующие пакеты были удержаны» для пакетов openssh-client и openssh-server при выполнении apt upgrade в моем Debian 12. Затем я попробовал

apt remove openssh-client openssh-server

В надежде, что

apt install openssh-client

установит обновленный пакет. Однако теперь я получаю следующий результат

apt install openssh-client
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openssh-client : Depends: libssl3 (>= 3.0.15) but 3.0.14-1~deb12u2 is to be installed
E: Unable to correct problems, you have held broken packages.

Мой sourcelist:

# deb cdrom:[Debian GNU/Linux 12.7.0 _Bookworm_ - Official amd64 NETINST with firmware 20240831-10:38]/ bookworm contrib main non-free-firmware

deb http://deb.debian.org/debian/ bookworm non-free-firmware contrib main non-free
deb-src http://deb.debian.org/debian/ bookworm non-free-firmware contrib main non-free

deb http://security.debian.org/debian-security bookworm-security non-free-firmware contrib main
deb-src http://security.debian.org/debian-security bookworm-security non-free-firmware contrib main

# bookworm-updates, чтобы получить обновления до выпуска новой версии;
# см. https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bookworm-updates non-free-firmware contrib non-free main
deb-src http://deb.debian.org/debian/ bookworm-updates non-free-firmware contrib non-free main

# Эта система была установлена с использованием небольших съемных носителей
# (например, netinst, live или одного CD). Соответствующие записи "deb cdrom"
# были отключены в конце процесса установки.
# Для получения информации о том, как настроить источники пакетов apt,
# см. руководство по sources.list(5).

Ниже результаты выполнения apt update и apt upgrade:

# apt update 
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease                       
Hit:3 http://security.debian.org/debian-security bookworm-security InRelease        
Hit:4 https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64  InRelease
Reading package lists... Done                                 
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
# apt upgrade 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded

Другие результаты, которые могут помочь:

apt rdepends --installed libssl3
libssl3
Reverse Depends:
  Depends: linux-kbuild-6.1 (>= 3.0.0)
  Depends: rsync (>= 3.0.0)
  Depends: libpython3.11-minimal (>= 3.0.0)
  Depends: python3-cryptography (>= 3.0.0)
  Depends: libpq5 (>= 3.0.0)
  Depends: php8.2-common (>= 3.0.0)
  Depends: php8.2-cli (>= 3.0.0)
  Depends: libapache2-mod-php8.2 (>= 3.0.0)
  Depends: openssl (>= 3.0.9)
  Depends: linux-kbuild-6.1 (>= 3.0.0)
  Depends: libtpms0 (>= 3.0.0)
  Depends: gstreamer1.0-plugins-good (>= 3.0.0)
  Depends: libcurl4 (>= 3.0.0)
  Depends: librbd1 (>= 3.0.0)
  Depends: librados2 (>= 3.0.0)
  Depends: bind9-libs (>= 3.0.0)
  Depends: apache2-utils (>= 3.0.0)
  Depends: apache2-bin (>= 3.0.0)
  Depends: wpasupplicant (>= 3.0.0)
  Depends: w3m (>= 3.0.0)
  Depends: transmission-gtk (>= 3.0.0)
  Depends: libtss2-esys-3.0.2-0 (>= 3.0.0)
  Depends: telegram-desktop (>= 3.0.0)
  Depends: systemd-container (>= 3.0.0)
  PreDepends: systemd (>= 3.0.0)
  Depends: libsystemd-shared (>= 3.0.0)
  Depends: swtpm-tools (>= 3.0.0)
  Depends: swtpm-libs (>= 3.0.0)
  Depends: libspice-client-glib-2.0-8 (>= 3.0.0)
  Depends: libspice-server1 (>= 3.0.0)
  Depends: socat (>= 3.0.0)
  Depends: sbsigntool (>= 3.0.0)
  Depends: libruby3.1 (>= 3.0.0)
  Depends: rsync (>= 3.0.0)
  Recommends: librhash0
  Depends: libqt5network5
  Depends: libpython3.11-minimal (>= 3.0.0)
  Depends: python3-cryptography (>= 3.0.0)
  Depends: ppp (>= 3.0.0)
  Depends: libpq5 (>= 3.0.0)
  Depends: libpipewire-0.3-modules (>= 3.0.0)
  Depends: php8.2-common (>= 3.0.0)
  Depends: php8.2-cli (>= 3.0.0)
  Depends: libapache2-mod-php8.2 (>= 3.0.0)
  Depends: perl-openssl-defaults (>= 3.0.0)
  Depends: osslsigncode (>= 3.0.0)
  Depends: openssl (>= 3.0.9)
  Depends: libsnmp40 (>= 3.0.0)
  Depends: libneon27 (>= 3.0.0)
  Depends: mupdf-tools (>= 3.0.0)
  Depends: mokutil (>= 3.0.0)
  Depends: mariadb-server-core (>= 3.0.0)
  Depends: mariadb-server (>= 3.0.0)
  Depends: mariadb-client-core (>= 3.0.0)
  Depends: mariadb-client (>= 3.0.0)
  Depends: libmariadb3 (>= 3.0.0)
  Depends: linux-kbuild-6.1 (>= 3.0.0)
  Depends: libtpms0 (>= 3.0.0)
  Depends: libssh2-1 (>= 3.0.0)
  Depends: libssh-4 (>= 3.0.0)
  Depends: libshout3 (>= 3.0.0)
  Depends: librabbitmq4 (>= 3.0.0)
  Depends: libnet-ssleay-perl (>= 3.0.0)
  Depends: libimobiledevice6 (>= 3.0.0)
  Depends: libfido2-1 (>= 3.0.0)
  Depends: libkrb5-3 (>= 3.0.0)
  Depends: libkmod2 (>= 3.0.0)
  Depends: kmod (>= 3.0.0)
  Depends: libhdf5-103-1 (>= 3.0.0)
  Depends: gstreamer1.0-plugins-good (>= 3.0.0)
  Depends: gstreamer1.0-plugins-bad (>= 3.0.0)
  Depends: libgrpc29 (>= 3.0.0)
  Depends: libglusterfs0 (>= 3.0.0)
  Depends: libgdcm3.0 (>= 3.0.0)
  Depends: libgdal32 (>= 3.0.0)
  Depends: galera-4 (>= 3.0.0)
  Depends: libwinpr2-2 (>= 3.0.0)
  Depends: libfreerdp2-2 (>= 3.0.0)
  Depends: dvisvgm (>= 3.0.0)
  Depends: libdcmtk17 (>= 3.0.0)
  Depends: libsasl2-modules (>= 3.0.0)
  Depends: libcurl4 (>= 3.0.0)
  Depends: libcryptsetup12 (>= 3.0.0)
  Depends: librbd1 (>= 3.0.0)
  Depends: librados2 (>= 3.0.0)
  Depends: bind9-libs (>= 3.0.0)
  Depends: libaprutil1 (>= 3.0.0)
  Depends: apache2-utils (>= 3.0.0)
  Depends: apache2-bin (>= 3.0.0)
# apt policy 
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64  Packages
     release o=NVIDIA,l=NVIDIA CUDA,c=
     origin developer.download.nvidia.com
 500 http://deb.debian.org/debian bookworm-updates/main amd64 Packages
     release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=main,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm-updates/non-free amd64 Packages
     release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=non-free,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm-updates/contrib amd64 Packages
     release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=contrib,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm-updates/non-free-firmware amd64 Packages
     release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=non-free-firmware,b=amd64
     origin deb.debian.org
 500 http://security.debian.org/debian-security bookworm-security/main amd64 Packages
     release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
 500 http://security.debian.org/debian-security bookworm-security/contrib amd64 Packages
     release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=contrib,b=amd64
     origin security.debian.org
 500 http://security.debian.org/debian-security bookworm-security/non-free-firmware amd64 Packages
     release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=non-free-firmware,b=amd64
     origin security.debian.org
 500 http://deb.debian.org/debian bookworm/non-free amd64 Packages
     release v=12.9,o=Debian,a=stable,n=bookworm,l=Debian,c=non-free,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/main amd64 Packages
     release v=12.9,o=Debian,a=stable,n=bookworm,l=Debian,c=main,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/contrib amd64 Packages
     release v=12.9,o=Debian,a=stable,n=bookworm,l=Debian,c=contrib,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/non-free-firmware amd64 Packages
     release v=12.9,o=Debian,a=stable,n=bookworm,l=Debian,c=non-free-firmware,b=amd64
     origin deb.debian.org
Pinned packages:
# apt policy libssl3
libssl3:
  Installed: 3.0.14-1~deb12u2
  Candidate: 3.0.14-1~deb12u2
  Version table:
 *** 3.0.14-1~deb12u2 500
        500 http://security.debian.org/debian-security bookworm-security/main amd64 Packages
        100 /var/lib/dpkg/status
     3.0.14-1~deb12u1 500
        500 http://deb.debian.org/debian bookworm/main amd64 Packages

Похоже, ваш локальный кэш индексов репозиториев застрял в прошлом, по крайней мере для основного репозитория Debian 12. Чтобы исправить это, выполните

sudo rm /var/lib/apt/lists/*_*
sudo apt update

Затем вы сможете установить текущую версию libssl3 в Debian 12, 3.0.15-1~deb12u1. См. также Принудительное обновление apt для повторной загрузки информации.

.

Ответ или решение

Проблема, с которой вы столкнулись при установке пакетов openssh-client и openssh-server на Debian 12, заключается в неудовлетворенных зависимостях. В данном случае зависимость пакета openssh-client от библиотеки libssl3 с версией 3.0.15 вызывает затруднения, в то время как текущая установленная версия libssl3 — 3.0.14-1~deb12u2.

Теория (T)

В основе проблемы лежат зависимости пакетов и система управления пакетами, используемая в Debian. В Linux системы, такие как APT (Advanced Package Tool), управляют установкой и обновлением пакетов, при этом они постоянно отслеживают изменения в более актуальных версиях пакетов и их зависимостях.

Когда обновленные версии пакетов требуют более новых зависимостей, которые не установлены в системе, возникает конфликт версий, известный как "неудовлетворенные зависимости". Такая ситуация может привести к тому, что система не сможет самостоятельно найти способ для обновления или установки пакетов.

Пример (E)

В вашем случае проблема вызвана тем, что пакет openssh-client требует libssl3 версии не ниже 3.0.15, но на вашем компьютере установлена версия 3.0.14-1~deb12u2. Пакетная система Debian не может автоматически обновить libssl3 до требуемой версии из-за устаревших индексных файлов репозиториев или из-за несоответствия индексов и существующих версий в репозиториях.

Применение (A)

Для решения данной проблемы можно предпринять следующие шаги:

  1. Очистка кеша APT: Из-за того что информация о доступных обновлениях неактуальна, вам нужно вручную очистить кеш и обновить списки пакетов:

    sudo rm /var/lib/apt/lists/*_*
    sudo apt update
  2. Проверка обновлений libssl3: После обновления кеша, попробуйте обновить пакет libssl3:

    sudo apt install libssl3
  3. Обновление openssh-client и openssh-server: Если libssl3 успешно обновлен, попробуйте снова установить openssh-client с его зависимостями:

    sudo apt install openssh-client openssh-server
  4. Проверка pinning пакетов: Убедитесь, что в вашей системе нет закреплений (pinning), которые могут удерживать старую версию. Проверьте файл /etc/apt/preferences и удалите или измените записи, если они блокируют обновление.

  5. Репозитории и их содержимое: Убедитесь, что в файле /etc/apt/sources.list и приложениях к нему содержатся актуальные строки для всех необходимых репозиториев Debian 12. Это важный момент, который требует контроля вашей линейки репозиториев:

    deb http://deb.debian.org/debian/ bookworm main contrib non-free
    deb http://security.debian.org/debian-security bookworm-security main contrib non-free
    deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free
  6. Проверка на блокировки пакетов: Используйте утилиту dpkg для нахождения и разблокировки зависших или заблокированных пакетов, которые могут препятствовать обновлению.

Если вы предприняли все шаги, но проблема не была решена, возможно, на вашем локальном зеркале Debian наблюдаются неполадки или проблемы с синхронизацией. Попробуйте изменить зеркало на более стабильное или проверить через другую сеть, чтобы исключить локальные сетевые проблемы.

Данная проблема характерна для линуксовых дистрибутивов, и решение часто кроется в внимательной настройке источников пакетов и своевременном обновлении информации о версиях.

Оцените материал
Добавить комментарий

Капча загружается...