При установке apt-get -f не удается исправить зависимости

Я недавно попробовал dist-upgrade с 16.04 по 18.04. В процессе обновления сообщалось о проблемах с нарушенными зависимостями. Я отметил пакеты, надеясь, что смогу решить проблему позже.

Теперь я, кажется, застрял в месте, где я не могу ни установить, ни исправить, ни удалить пакеты.

Во-первых, мои репозитории:

ralmond@Limu:~$ cat /etc/apt/sources.list
# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 
(20120425)]/ dists/precise/main/binary-i386/

# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

# deb http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu trusty/ # disabled on upgrade to trusty disabled on upgrade to xenial
# deb https://mirrors.nics.utk.edu/cran/linux/ubuntu xenial main
# deb-src https://mirrors.nics.utk.edu/cran/linux/ubuntu xenial main
# deb http://cran.rstudio.com/bin/linux/ubuntu xenial/ # disabled on upgrade to bionic

Я вручную прокомментировал точное партнерское репо, поскольку это, возможно, было проблемой. Все другие старые репозитории в sources.list и sources.list.d были закомментированы.

Я пытаюсь запустить apt-get -f install, чтобы исправить нарушенные зависимости, но я получаю

ralmond@Limu:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
    debhelper : Depends: dh-autoreconf (>= 17~) but it is not installed
         Depends: dh-strip-nondeterminism (>= 0.028~) but 0.015-1 is installed
     libglib2.0-bin : Depends: libglib2.0-0 (= 2.56.1-2ubuntu1) but 2.48.2-0ubuntu1 is installed
     libhtml-parser-perl : Depends: perl (>= 5.26.0-4) but 5.22.1-9ubuntu0.5 is installed
                   Depends: perlapi-5.26.0
     libnet-ssleay-perl : Depends: perl (>= 5.26.1-4build1) but 5.22.1-9ubuntu0.5 is installed
                  Depends: perlapi-5.26.1
     libxml-libxml-perl : Depends: perl (>= 5.26.1-2ubuntu1) but 5.22.1-9ubuntu0.5 is installed
                  Depends: perlapi-5.26.1
     libxml-parser-perl : Depends: perl (>= 5.26.0-4) but 5.22.1-9ubuntu0.5 is installed
                  Depends: perlapi-5.26.0
     systemd : Depends: libsystemd0 (= 229-4ubuntu21.2) but 237-3ubuntu10 is installed
     texlive-binaries : Depends: libharfbuzz0b (>= 1.4.1) but 1.0.1-1ubuntu0.1 is installed
                Depends: libmpfr6 (>= 3.1.3) but it is not installed
                Depends: libpoppler73 (>= 0.62.0) but it is not installed
     texlive-extra-utils : Depends: libunicode-linebreak-perl but it is not installed
     texlive-generic-extra : Depends: texlive-plain-generic (>= 2017.20170628) but it is not installed
     texlive-generic-recommended : Depends: texlive-plain-generic (>= 2017.20170628) but it is not installed
     texlive-lang-chinese : Depends: fonts-arphic-bkai00mp but it is not installed
                    Depends: fonts-arphic-bsmi00lp but it is not installed
                    Depends: fonts-arphic-gbsn00lp but it is not installed
                    Depends: fonts-arphic-gkai00mp but it is not installed
   texlive-lang-korean : Depends: fonts-baekmuk but it is not installed
                   Depends: fonts-unfonts-extra but it is not installed
   texlive-lang-other : Depends: fonts-sil-padauk (>= 3.003-1) but 2.80-2 is installed
   texlive-plain-extra : Depends: texlive-plain-generic (>= 2017.20170628) but it is not installed
   texlive-pstricks : Depends: texlive-plain-generic (>= 2017.20170628) but it is not installed
   texlive-science : Depends: texlive-lang-greek (>= 2017.20170628) but it is not installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

Нет удерживаемых пакетов:

ralmond@Limu:~$ sudo apt-mark showhold
ralmond@Limu:~$ 

Если я попробую Снова dist-upgrade, я получаю очень похожие сообщения об ошибках:

ralmond@Limu:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
     debhelper : Depends: dh-autoreconf (>= 17~) but it is not installed
         Depends: dh-strip-nondeterminism (>= 0.028~) but 0.015-1 is installed
     libglib2.0-bin : Depends: libglib2.0-0 (= 2.56.1-2ubuntu1) but 2.48.2-0ubuntu1 is installed
... [Removing nearly identical list of broken packages.]
E: Unmet dependencies. Try using -f.

Параметр -f, похоже, не помогает.

ralmond@Limu:~$ sudo apt-get -f dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
      debhelper : Depends: dh-autoreconf (>= 17~) but it is not installed
         Depends: dh-strip-nondeterminism (>= 0.028~) but 0.015-1 is installed
...
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

Удаление пакета имеет схожие проблемы:

ralmond@Limu:~$ sudo apt-get -f remove debhelper
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
  alien : Depends: debhelper (>= 7) but it is not going to be installed
  dh-strip-nondeterminism : Depends: debhelper but it is not going to be installed
  dh-translations : Depends: debhelper but it is not going to be installed
  libglib2.0-bin : Depends: libglib2.0-0 (= 2.56.1-2ubuntu1) but 2.48.2-0ubuntu1 is to be installed
  libhtml-parser-perl : Depends: perl (>= 5.26.0-4) but 5.22.1-9ubuntu0.5 is to be installed
                   Depends: perlapi-5.26.0
  libnet-ssleay-perl : Depends: perl (>= 5.26.1-4build1) but 5.22.1-9ubuntu0.5 is to be installed
                  Depends: perlapi-5.26.1
  libxml-libxml-perl : Depends: perl (>= 5.26.1-2ubuntu1) but 5.22.1-9ubuntu0.5 is to be installed
                  Depends: perlapi-5.26.1
  libxml-parser-perl : Depends: perl (>= 5.26.0-4) but 5.22.1-9ubuntu0.5 is to be installed
                  Depends: perlapi-5.26.0
  systemd : Depends: libsystemd0 (= 229-4ubuntu21.2) but 237-3ubuntu10 is to be installed
  texlive-binaries : Depends: libharfbuzz0b (>= 1.4.1) but 1.0.1-1ubuntu0.1 is to be installed
                Depends: libmpfr6 (>= 3.1.3) but it is not going to be installed
                Depends: libpoppler73 (>= 0.62.0) but it is not going to be installed
  texlive-extra-utils : Depends: libunicode-linebreak-perl but it is not going to be installed
  texlive-generic-extra : Depends: texlive-plain-generic (>= 2017.20170628) but it is not going to be installed
  texlive-generic-recommended : Depends: texlive-plain-generic (>= 2017.20170628) but it is not going to be installed
  texlive-lang-chinese : Depends: fonts-arphic-bkai00mp but it is not going to be installed
                    Depends: fonts-arphic-bsmi00lp but it is not going to be installed
                    Depends: fonts-arphic-gbsn00lp but it is not going to be installed
                    Depends: fonts-arphic-gkai00mp but it is not going to be installed
  texlive-lang-korean : Depends: fonts-baekmuk but it is not going to be installed
                   Depends: fonts-unfonts-extra but it is not going to be installed
  texlive-lang-other : Depends: fonts-sil-padauk (>= 3.003-1) but 2.80-2 is to be installed
  texlive-plain-extra : Depends: texlive-plain-generic (>= 2017.20170628) but it is not going to be installed
  texlive-pstricks : Depends: texlive-plain-generic (>= 2017.20170628) but it is not going to be installed
  texlive-science : Depends: texlive-lang-greek (>= 2017.20170628) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Это действительно похоже на то, что debhelper сломан. Я боюсь быть слишком агрессивным по поводу удаления этого из-за страха, что я сломаю всю систему Debian и не смогу двигаться вперед или назад.

Заранее благодарим за любую помощь или предложения о том, что попробовать дальше.

Обновление 1: По этой ссылке ( Ошибка неудовлетворенных зависимостей ). Он предложил попробовать dpkg --purge --pending. Это не решило мою проблему, но я думаю, что это дало подсказку. Вот вывод:

ralmond@Limu:~$ sudo dpkg --purge --pending
[sudo] password for ralmond: 
dpkg: dependency problems prevent removal of texlive:
  mathtex depends on texlive.

dpkg: error processing package texlive (--purge):
  dependency problems - not removing
(Reading database ... 545797 files and directories currently installed.)
Removing systemd-shim (9-1bzr4ubuntu1) ...
Removing 'diversion of /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service to /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd by systemd-shim'
  dpkg-divert: error: rename involves overwriting '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service' with
  different file '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd', not allowed
dpkg: error processing package systemd-shim (--purge):
  installed systemd-shim package post-removal script subprocess 
returned error exit status 2
Errors were encountered while processing:
  texlive
  systemd-shim
0
задан 7 July 2018 в 18:01

1 ответ

Я думаю, что нашел ответ. Это медленно и болезненно, но я надеюсь, что это получит меня там. (Я отчасти через).

1) Сначала я удалил столько пакетов, сколько я мог с помощью dpkg -r(например, все texlive пакеты не являются очень важной системой, и я могу переустановить их позже, таким образом, я убрал столько из тех, сколько я мог.

2) Для пакетов, которые являются на самом деле частью системы, я использовал следующие шаги:

a) Использовать sudo apt-get -f install проверять, что все еще повреждается.

ralmond@Limu:~/packageDepot$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 libglib2.0-bin : Depends: libglib2.0-0 (= 2.56.1-2ubuntu1) but 2.48.2-0ubuntu1 is installed
 libhtml-parser-perl : Depends: perl (>= 5.26.0-4) but 5.22.1-9ubuntu0.5 is installed
                   Depends: perlapi-5.26.0
 libnet-ssleay-perl : Depends: perl (>= 5.26.1-4build1) but 5.22.1-9ubuntu0.5 is installed
                  Depends: perlapi-5.26.1
 libxml-parser-perl : Depends: perl (>= 5.26.0-4) but 5.22.1-9ubuntu0.5 is installed
                  Depends: perlapi-5.26.0
 systemd : Depends: libsystemd0 (= 229-4ubuntu21.2) but 237-3ubuntu10 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

2) Работая один пакет за один раз, использовать apt-get install проверять на недостающие зависимости. Затем в списке glib2, таким образом:

ralmond@Limu:~/packageDepot$ sudo apt-get install libglib2.0-0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
   libglib2.0-0 : Breaks: libglib2.0-0:i386 (!= 2.56.1-2ubuntu1) but 2.48.2-0ubuntu1 is to be installed
   libglib2.0-0:i386 : Breaks: libglib2.0-0 (!= 2.48.2-0ubuntu1) but 2.56.1-2ubuntu1 is to be installed
   libhtml-parser-perl : Depends: perl (>= 5.26.0-4) but 5.22.1-9ubuntu0.5 is to be installed
   ... 
   E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

А-ч! Существует зависимость от i386 версии. Выполненный снова, чтобы проверить, что i386 версия не имеет никаких зависимостей.

ralmond@Limu:~/packageDepot$ sudo apt-get install libglib2.0-0 libglib2.0-0:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
   libhtml-parser-perl : Depends: perl (>= 5.26.0-4) but 5.22.1-9ubuntu0.5 is to be installed
   ... [Same list of packages]
   E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Затем, я вручную загружаю использование файлов apt-get download. Отметьте, не выполняйте это как корень, или файлы не будут удаляемыми без sudo.

ralmond@Limu:~/packageDepot$ apt-get download libglib2.0-0 libglib2.0- 0:i386
Get:1 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libglib2.0-0 amd64 2.56.1-2ubuntu1 [1,167 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu bionic/main i386 libglib2.0-0 i386 2.56.1-2ubuntu1 [1,232 kB]
Fetched 2,399 kB in 7s (323 kB/s)                                              

Теперь вручную использование установки dpkg -i.

ralmond@Limu:~/packageDepot$ sudo dpkg -i ./libglib*
(Reading database ... 421587 files and directories currently installed.)
 Preparing to unpack .../libglib2.0-0_2.56.1-2ubuntu1_amd64.deb ...
 De-configuring libglib2.0-0:i386 (2.48.2-0ubuntu1) ...
 Unpacking libglib2.0-0:amd64 (2.56.1-2ubuntu1) over (2.48.2-0ubuntu1) ...
 Preparing to unpack .../libglib2.0-0_2.56.1-2ubuntu1_i386.deb ...
 Unpacking libglib2.0-0:i386 (2.56.1-2ubuntu1) over (2.48.2-0ubuntu1) ...
 Setting up libglib2.0-0:amd64 (2.56.1-2ubuntu1) ...
 Setting up libglib2.0-0:i386 (2.56.1-2ubuntu1) ...
 Processing triggers for libc-bin (2.27-3ubuntu1) ...

Теперь назад к apt-get -f install решить следующую проблему.

Я обновлю, если я обнаружу, что больше шагов необходимо.

0
ответ дан 7 July 2018 в 18:01

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

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