Неудовлетворенные зависимости при установке php5-curl [дубликат]

После обновления с 10.04 до 12.04 я пытаюсь установить разные пакеты . Например, ia32-libs и skype (4.0).

При попытке их установки я получаю сообщение об ошибке «Не удается исправить проблемы, у вас есть битые пакеты».

Вывод команд:

sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

После запуска:

sudo dpkg --configure -a
foo@foo:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
314
задан 23 August 2014 в 06:30

1 ответ

Сообщение об ошибке вводит в заблуждение.

В нем говорится: « вы держали пакеты », хотя часто у вас не будет никаких пакетов:

$ apt-mark showhold

Ничего не напечатает.

Что на самом деле , так это то, что пакеты удерживаются самим apt при выполнении анализа зависимостей. Так, например, вы можете увидеть такой вывод:

$ apt-get install gcc:i386
<...skip...>
The following packages have unmet dependencies:
 gcc:i386 : Depends: cpp:i386 (= 4:9.3.0-1ubuntu2) but it is not going to be installed
            Depends: gcc-9:i386 (>= 9.3.0-3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Очевидно, что это не очень полезно ...

Итак, чтобы отладить это дальше, запустите apt с флагом -o Debug :: pkgProblemResolver = yes

$ apt-get -o Debug::pkgProblemResolver=yes install gcc:i386

Теперь будет напечатано несколько строк вроде

Investigating (0) gcc:amd64 < 4:9.3.0-1ubuntu2 @ii mK Ib >
Broken gcc:amd64 Conflicts on gcc:i386 < none -> 4:9.3.0-1ubuntu2 @un puN Ib >
  Considering gcc:i386 9999 as a solution to gcc:amd64 3
  Removing gcc:amd64 rather than change gcc:i386
Investigating (0) binutils:amd64 < 2.34-6ubuntu1.1 @ii mK Ib >
Broken binutils:amd64 Conflicts on binutils:i386 < none -> 2.34-6ubuntu1.1 @un uN Ib >
  Considering binutils:i386 0 as a solution to binutils:amd64 1
  Added binutils:i386 to the remove list
  Conflicts//Breaks against version 2.34-6ubuntu1 for binutils but that is not InstVer, ignoring
  Fixing binutils:amd64 via keep of binutils:i386
Investigating (0) cpp:amd64 < 4:9.3.0-1ubuntu2 @ii mK Ib >
Broken cpp:amd64 Depends on cpp-9:amd64 < 9.3.0-17ubuntu1~20.04 @ii mR > (>= 9.3.0-3~)
  Considering cpp-9:amd64 -1 as a solution to cpp:amd64 1
  Added cpp-9:amd64 to the remove list
Broken cpp:amd64 Conflicts on cpp:i386 < none -> 4:9.3.0-1ubuntu2 @un uN Ib >
  Considering cpp:i386 0 as a solution to cpp:amd64 1
  Added cpp:i386 to the remove list
  Fixing cpp:amd64 via keep of cpp-9:amd64
  Fixing cpp:amd64 via keep of cpp:i386
. . .

В итоге gcc: i386 не может сосуществовать с gcc: amd64 . Это все, что apt действительно мог сказать.

0
ответ дан 28 July 2021 в 15:06

Другие вопросы по тегам:

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