sự không phù hợp phụ thuộc libc6 trong Debian 9.12 duỗi thẳng

Tôi gặp sự cố phụ thuộc libc6 sau đây trong bản kéo dài Debian 9.12.

sudo apt install libc6-dev

Reading package lists... Done
Building dependency tree
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:
 libc6-dev : Depends: libc6 (= 2.24-11+deb9u4) but 2.27-6 is to be installed
             Depends: libc-dev-bin (= 2.24-11+deb9u4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Làm cách nào để khắc phục sự cố này?

EDIT1: apt policy libc6

libc6:
  Installed: 2.27-6
  Candidate: 2.27-6
  Version table:
 *** 2.27-6 100
        100 /var/lib/dpkg/status
     2.24-11+deb9u4 500
        500 http://deb.debian.org/debian stretch/main amd64 Packages
     2.24-11+deb9u1 500
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages

EDIT2:

apt install libc6/stretch libc6-dev/stretch libc-dev-bin/stretch
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '2.24-11+deb9u4' (Debian:9.12/oldstable [amd64]) for 'libc6'
Selected version '2.24-11+deb9u4' (Debian:9.12/oldstable [amd64]) for 'libc6-dev'
Selected version '2.24-11+deb9u4' (Debian:9.12/oldstable [amd64]) for 'libc-dev-bin'
The following additional packages will be installed:
linux-libc-dev
Suggested packages:
glibc-doc locales
The following packages will be REMOVED:
libc-bin locales sudo
The following NEW packages will be installed:
libc-dev-bin libc6-dev linux-libc-dev
The following packages will be DOWNGRADED:
libc6
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
libc-bin
0 upgraded, 3 newly installed, 1 downgraded, 3 to remove and 0 not upgraded.
Need to get 6,797 kB of archives.
After this operation, 1,437 kB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?]
-1
задан 29 February 2020 в 01:35
1 ответ

Вы настроили свою систему на использование пакетов из нескольких дистрибутивов одновременно (так называемый Frankenstein-Debian), поэтому ошибки зависимости являются нормальным явлением. Запустите cat /etc/apt/sources.list{,.d/*.list} в bash , чтобы вывести список всех источников.

Ваш libc6 ( версия 2.27-6 ) застряла где-то между stretch (версия 2.24-11 + deb9u4 ) и buster (версия 2.28 -10 ). Я предполагаю, что вы вытащили некоторые пакеты из buster , в то время как это был дистрибутив testing . Самый простой способ решить эту проблему:

  1. Найдите в своих источниках APT ссылку на testing или buster . Если вы найдете что-то вроде:

     deb http://deb.debian.org/debian testing main non-free contrib
     

    замените его на:

     deb http://deb.debian.org/debian buster main non-free contrib
     

    , поскольку buster больше не является тестовым дистрибутивом ( bullseye есть).

  2. Обновите список пакетов:

     apt update
     
  3. Обновите libc6 до версии из buster :

     apt install libc6 / buster libc6-dev / buster libc-dev-bin / buster
     
  4. Рассмотрите возможность обновления до Debian 10 в ближайшем будущем, чтобы все пакеты были из одного и того же дистрибутива.

Изменить: Похоже, у вас мало пакетов с версией выше, чем Stretch,поэтому вы можете просто понизить их версию:

apt install libc6/stretch libc6-dev/stretch libc-dev-bin/stretch libc-bin/stretch locales/stretch sudo/stretch

и удалить buster и компанию из источников APT.

3
ответ дан 30 March 2020 в 03:20

Теги

Похожие вопросы