После обновления с 18.04 до 20.04 многие команды apt не работают:
apt-get update
, apt-get remove pritunl-client-gtk
(то же самое для purge
), apt-get --fix-broken install
, apt-get autoremove
.
Все они терпят неудачу: установленный подпроцесс сценария предварительного удаления пакета pritunl-client-gtk был прерван сигналом (Завершено)
. 12174] Вот некоторые результаты (сокращенные на [...]):
:~$ sudo apt-get update
Hit:1 http://ubuntu.ethz.ch/ubuntu focal InRelease
Ign:2 http://dl.google.com/linux/chrome-remote-desktop/deb stable InRelease
[...]
Get:26 http://ubuntu.ethz.ch/ubuntu focal-security/universe amd64 DEP-11 Metadata [55.7 kB]
Fetched 3,242 kB in 2s (1,802 kB/s)
appstreamcli: symbol lookup error: appstreamcli: undefined symbol: AS_APPSTREAM_METADATA_PATHS
Reading package lists... Done
N: Skipping acquire of configured file 'stable/binary-i386/Packages' as repository 'https://download.docker.com/linux/ubuntu focal InRelease' doesn't support architecture 'i386'
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://download.mono-project.com/repo/ubuntu stable-focal InRelease' doesn't support architecture 'i386'
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi'
E: Sub-process returned an error code
:~$ sudo apt-get remove pritunl-client-gtk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
[...]
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
pritunl-client-gtk
0 to upgrade, 0 to newly install, 1 to remove and 974 not to upgrade.
After this operation, 1,397 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 335530 files and directories currently installed.)
Removing pritunl-client-gtk (1.0.1865.25-0ubuntu1~xenial) ...
dpkg: error processing package pritunl-client-gtk (--remove):
installed pritunl-client-gtk package pre-removal script subprocess was killed by signal (Terminated)
dpkg: too many errors, stopping
Errors were encountered while processing:
pritunl-client-gtk
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
[...]
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
pritunl-client-gtk
0 to upgrade, 0 to newly install, 1 to remove and 974 not to upgrade.
After this operation, 1,397 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 335530 files and directories currently installed.)
Removing pritunl-client-gtk (1.0.1865.25-0ubuntu1~xenial) ...
dpkg: error processing package pritunl-client-gtk (--remove):
installed pritunl-client-gtk package pre-removal script subprocess was killed by signal (Terminated)
dpkg: too many errors, stopping
Errors were encountered while processing:
pritunl-client-gtk
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Как было предложено в других вопросах, я попытался исправить libappstream
:
:~$ dpkg -l '*libappstream*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-========================-============-============-==========================================
ii libappstream-glib8:amd64 0.7.7-2 amd64 GNOME library to access AppStream services
ii libappstream4:amd64 0.12.10-2 amd64 Library to access AppStream services
:~$ sudo apt install --reinstall libappstream4
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
pritunl-client-gtk : Depends: python-appindicator but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Я уже пробовал - исправить -broken install
(см. выше), поэтому я попробовал:
~$ sudo apt-get install python-appindicator
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-appindicator is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python-appindicator' has no installation candidate
Таким образом, определенно проблема с отсутствующим python-appindicator (также предлагается здесь ). Я не могу сказать, связано ли это с завершением --remove.
Вопросы (ответа на один из них, вероятно, будет достаточно):
python-appindicator
для Ubuntu 20.04? I обнаружил несколько похожих проблем, но ни один из них, похоже, не дает сбоев во время предварительного удаления, поэтому их решения не подходят, см., например, здесь , здесь или здесь .
РЕДАКТИРОВАТЬ
Как просили в комментариях, вот мой список репо:
:~$ grep -r deb /etc/apt/sources.list /etc/apt/sources.list.d
/etc/apt/sources.list:# deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted
/etc/apt/sources.list:deb http://ubuntu.ethz.ch/ubuntu/ focal main restricted
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic main restricted
/etc/apt/sources.list:deb http://ubuntu.ethz.ch/ubuntu/ focal-updates main restricted
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
/etc/apt/sources.list:deb http://ubuntu.ethz.ch/ubuntu/ focal universe
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic universe
/etc/apt/sources.list:deb http://ubuntu.ethz.ch/ubuntu/ focal-updates universe
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-updates universe
/etc/apt/sources.list:deb http://ubuntu.ethz.ch/ubuntu/ focal multiverse
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic multiverse
/etc/apt/sources.list:deb http://ubuntu.ethz.ch/ubuntu/ focal-updates multiverse
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
/etc/apt/sources.list:deb http://ubuntu.ethz.ch/ubuntu/ focal-backports main restricted universe multiverse
/etc/apt/sources.list:# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
/etc/apt/sources.list:# deb http://archive.canonical.com/ubuntu bionic partner
/etc/apt/sources.list:# deb-src http://archive.canonical.com/ubuntu bionic partner
/etc/apt/sources.list:deb http://ubuntu.ethz.ch/ubuntu/ focal-security main restricted
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
/etc/apt/sources.list:deb http://ubuntu.ethz.ch/ubuntu/ focal-security universe
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
/etc/apt/sources.list:deb http://ubuntu.ethz.ch/ubuntu/ focal-security multiverse
/etc/apt/sources.list:# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
/etc/apt/sources.list:# deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main # disabled on upgrade to focal
/etc/apt/sources.list:# deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main
/etc/apt/sources.list.d/puppet5.list.save:# deb http://apt.puppetlabs.com focal puppet5 # disabled on upgrade to focal
/etc/apt/sources.list.d/puppet5.list.save:# deb-src http://apt.puppetlabs.com bionic puppet5
/etc/apt/sources.list.d/pc_repo.list:# deb https://apt.puppet.com focal puppet5 # disabled on upgrade to focal
/etc/apt/sources.list.d/mono-xamarin.list.distUpgrade:deb https://download.mono-project.com/repo/ubuntu stable-bionic main
/etc/apt/sources.list.d/google-chrome.list.distUpgrade:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/hnakamur-ubuntu-libarchive-bionic.list.save:# deb http://ppa.launchpad.net/hnakamur/libarchive/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/hnakamur-ubuntu-libarchive-bionic.list.save:# deb-src http://ppa.launchpad.net/hnakamur/libarchive/ubuntu bionic main
/etc/apt/sources.list.d/buildkite-agent.list:# deb https://apt.buildkite.com/buildkite-agent stable main # disabled on upgrade to focal
/etc/apt/sources.list.d/iovisor.list.distUpgrade:deb https://repo.iovisor.org/apt/bionic bionic main
/etc/apt/sources.list.d/vscode.list.save:# deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main # disabled on upgrade to focal
/etc/apt/sources.list.d/pc_repo.list.save:# deb https://apt.puppet.com focal puppet5 # disabled on upgrade to focal
/etc/apt/sources.list.d/bazel.list.save:deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8
/etc/apt/sources.list.d/docker-ce.list.distUpgrade:deb https://download.docker.com/linux/ubuntu bionic stable
/etc/apt/sources.list.d/google-chrome.list.save:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/hnakamur-ubuntu-cmake-bionic.list.distUpgrade:deb http://ppa.launchpad.net/hnakamur/cmake/ubuntu bionic main
/etc/apt/sources.list.d/hnakamur-ubuntu-cmake-bionic.list.distUpgrade:# deb-src http://ppa.launchpad.net/hnakamur/cmake/ubuntu bionic main
/etc/apt/sources.list.d/iovisor.list.save:# deb https://repo.iovisor.org/apt/bionic focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/google-cloud-sdk.list:deb http://packages.cloud.google.com/apt cloud-sdk main
/etc/apt/sources.list.d/bluetooth-ubuntu-bluez-bionic.list.save:# deb http://ppa.launchpad.net/bluetooth/bluez/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/bluetooth-ubuntu-bluez-bionic.list.save:# deb-src http://ppa.launchpad.net/bluetooth/bluez/ubuntu bionic main
/etc/apt/sources.list.d/mono-xamarin.list.save:deb https://download.mono-project.com/repo/ubuntu stable-focal main
/etc/apt/sources.list.d/puppet5.list.distUpgrade:deb http://apt.puppetlabs.com bionic puppet5
/etc/apt/sources.list.d/puppet5.list.distUpgrade:# deb-src http://apt.puppetlabs.com bionic puppet5
/etc/apt/sources.list.d/libreoffice-ubuntu-ppa-bionic.list.distUpgrade:deb http://ppa.launchpad.net/libreoffice/ppa/ubuntu bionic main
/etc/apt/sources.list.d/libreoffice-ubuntu-ppa-bionic.list.distUpgrade:# deb-src http://ppa.launchpad.net/libreoffice/ppa/ubuntu bionic main
/etc/apt/sources.list.d/osquery_repo.list.save:# deb [arch=amd64] https://pkg.osquery.io/deb deb main # disabled on upgrade to focal
/etc/apt/sources.list.d/buildkite-agent.list.save:# deb https://apt.buildkite.com/buildkite-agent stable main # disabled on upgrade to focal
/etc/apt/sources.list.d/hnakamur-ubuntu-libzstd-bionic.list.save:# deb http://ppa.launchpad.net/hnakamur/libzstd/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/hnakamur-ubuntu-libzstd-bionic.list.save:# deb-src http://ppa.launchpad.net/hnakamur/libzstd/ubuntu bionic main
/etc/apt/sources.list.d/pc_repo.list.distUpgrade:deb https://apt.puppet.com bionic puppet5
/etc/apt/sources.list.d/chrome-remote-desktop.list.save:deb [arch=amd64] http://dl.google.com/linux/chrome-remote-desktop/deb/ stable main
/etc/apt/sources.list.d/pritunl.list:deb http://repo.pritunl.com/stable/apt xenial main # disabled on upgrade to focal
/etc/apt/sources.list.d/hnakamur-ubuntu-libzstd-bionic.list.distUpgrade:deb http://ppa.launchpad.net/hnakamur/libzstd/ubuntu bionic main
/etc/apt/sources.list.d/hnakamur-ubuntu-libzstd-bionic.list.distUpgrade:# deb-src http://ppa.launchpad.net/hnakamur/libzstd/ubuntu bionic main
/etc/apt/sources.list.d/bazel.list:deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8
/etc/apt/sources.list.d/sbt.list:# deb http://dl.bintray.com/sbt/debian / # disabled on upgrade to focal
/etc/apt/sources.list.d/google-cloud-sdk.list.save:deb http://packages.cloud.google.com/apt cloud-sdk main
/etc/apt/sources.list.d/buildkite-agent.list.distUpgrade:deb https://apt.buildkite.com/buildkite-agent stable main
/etc/apt/sources.list.d/hnakamur-ubuntu-libarchive-bionic.list.distUpgrade:deb http://ppa.launchpad.net/hnakamur/libarchive/ubuntu bionic main
/etc/apt/sources.list.d/hnakamur-ubuntu-libarchive-bionic.list.distUpgrade:# deb-src http://ppa.launchpad.net/hnakamur/libarchive/ubuntu bionic main
/etc/apt/sources.list.d/libreoffice-ubuntu-ppa-bionic.list:# deb http://ppa.launchpad.net/libreoffice/ppa/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/libreoffice-ubuntu-ppa-bionic.list:# deb-src http://ppa.launchpad.net/libreoffice/ppa/ubuntu bionic main
/etc/apt/sources.list.d/mono-xamarin.list:deb https://download.mono-project.com/repo/ubuntu stable-focal main
/etc/apt/sources.list.d/google-cloud-sdk.list.distUpgrade:deb http://packages.cloud.google.com/apt cloud-sdk main
/etc/apt/sources.list.d/osquery_repo.list.distUpgrade:deb [arch=amd64] https://pkg.osquery.io/deb deb main
/etc/apt/sources.list.d/bluetooth-ubuntu-bluez-bionic.list.distUpgrade:deb http://ppa.launchpad.net/bluetooth/bluez/ubuntu bionic main
/etc/apt/sources.list.d/bluetooth-ubuntu-bluez-bionic.list.distUpgrade:# deb-src http://ppa.launchpad.net/bluetooth/bluez/ubuntu bionic main
/etc/apt/sources.list.d/chrome-remote-desktop.list.distUpgrade:deb [arch=amd64] http://dl.google.com/linux/chrome-remote-desktop/deb/ stable main
/etc/apt/sources.list.d/dotnet-sdk.list:# deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/hnakamur-ubuntu-libzstd-bionic.list:# deb http://ppa.launchpad.net/hnakamur/libzstd/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/hnakamur-ubuntu-libzstd-bionic.list:# deb-src http://ppa.launchpad.net/hnakamur/libzstd/ubuntu bionic main
/etc/apt/sources.list.d/hnakamur-ubuntu-cmake-bionic.list.save:# deb http://ppa.launchpad.net/hnakamur/cmake/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/hnakamur-ubuntu-cmake-bionic.list.save:# deb-src http://ppa.launchpad.net/hnakamur/cmake/ubuntu bionic main
/etc/apt/sources.list.d/dotnet-sdk.list.save:# deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/clang-format-7.list:# deb [arch=amd64] http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main # disabled on upgrade to focal
/etc/apt/sources.list.d/clang-format-7.list.save:# deb [arch=amd64] http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main # disabled on upgrade to focal
/etc/apt/sources.list.d/bazel.list.distUpgrade:deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8
/etc/apt/sources.list.d/pritunl.list.save:# deb http://repo.pritunl.com/stable/apt xenial main # disabled on upgrade to focal
/etc/apt/sources.list.d/pritunl.list.distUpgrade:deb http://repo.pritunl.com/stable/apt xenial main
/etc/apt/sources.list.d/hnakamur-ubuntu-cmake-bionic.list:# deb http://ppa.launchpad.net/hnakamur/cmake/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/hnakamur-ubuntu-cmake-bionic.list:# deb-src http://ppa.launchpad.net/hnakamur/cmake/ubuntu bionic main
/etc/apt/sources.list.d/docker-ce.list.save:deb https://download.docker.com/linux/ubuntu focal stable
/etc/apt/sources.list.d/bluetooth-ubuntu-bluez-bionic.list:# deb http://ppa.launchpad.net/bluetooth/bluez/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/bluetooth-ubuntu-bluez-bionic.list:# deb-src http://ppa.launchpad.net/bluetooth/bluez/ubuntu bionic main
/etc/apt/sources.list.d/osquery_repo.list:# deb [arch=amd64] https://pkg.osquery.io/deb deb main # disabled on upgrade to focal
/etc/apt/sources.list.d/puppet5.list:# deb http://apt.puppetlabs.com focal puppet5 # disabled on upgrade to focal
/etc/apt/sources.list.d/puppet5.list:# deb-src http://apt.puppetlabs.com bionic puppet5
/etc/apt/sources.list.d/dotnet-sdk.list.distUpgrade:deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main
/etc/apt/sources.list.d/iovisor.list:# deb https://repo.iovisor.org/apt/bionic focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/sbt.list.distUpgrade:deb http://dl.bintray.com/sbt/debian /
/etc/apt/sources.list.d/hnakamur-ubuntu-libarchive-bionic.list:# deb http://ppa.launchpad.net/hnakamur/libarchive/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/hnakamur-ubuntu-libarchive-bionic.list:# deb-src http://ppa.launchpad.net/hnakamur/libarchive/ubuntu bionic main
/etc/apt/sources.list.d/docker-ce.list:deb https://download.docker.com/linux/ubuntu focal stable
/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/vscode.list:# deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main # disabled on upgrade to focal
/etc/apt/sources.list.d/sbt.list.save:# deb http://dl.bintray.com/sbt/debian / # disabled on upgrade to focal
/etc/apt/sources.list.d/vscode.list.distUpgrade:deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main
/etc/apt/sources.list.d/clang-format-7.list.distUpgrade:deb [arch=amd64] http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main
/etc/apt/sources.list.d/libreoffice-ubuntu-ppa-bionic.list.save:# deb http://ppa.launchpad.net/libreoffice/ppa/ubuntu focal main # disabled on upgrade to focal
/etc/apt/sources.list.d/libreoffice-ubuntu-ppa-bionic.list.save:# deb-src http://ppa.launchpad.net/libreoffice/ppa/ubuntu bionic main
/etc/apt/sources.list.d/chrome-remote-desktop.list:deb [arch=amd64] http://dl.google.com/linux/chrome-remote-desktop/deb/ stable main
РЕДАКТИРОВАТЬ 2
Мне удалось удалить pritunl-client-gtk
, вставив exit 0
в начало сценария удаления: / var / lib / dpkg / info / pritunl-client-gtk .prerm
После этого apt --fix-broken remove
/ ... install
, а также apt autoremove
и apt переустановите libappstream4
все работает нормально и очищено.
Однако apt-get update
по-прежнему не работает, как описано выше.
Итак, я исправил это.
Короче говоря, ключевыми частями были
exit 0
, чтобы пропустить его. Подробно (не все из них могут потребоваться, но это то, что я сделал):
exit 0
в начало сценария предварительного удаления: /var/lib/dpkg/info/pritunl-client-gtk.prerm
apt --fix-broken remove
apt --fix-broken install
apt autoremove
:~$ dpkg -l | grep -i appstream
ii appstream 0.12.10-2 amd64 Software component metadata management
ii libappstream-glib8:amd64 0.7.16-1ubuntu1 amd64 GNOME library to access AppStream services
ii libappstream4:amd64 0.12.10-2 amd64 Library to access AppStream services
apt переустановить xxx
для каждого из этих трех: libappstream4
, appstream
, libappstream-glib8
Теперь apt-get update
работает нормально.
О, так много ppa.
в первую очередь сделайте резервную копию ваших важных данных.
В
/etc/apt/sources.list.d/docker-ce.list:deb https://download.docker.com/linux/ubuntu focal stable
добавьте [arch = amd64]
deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable
, затем удалите вредоносные пакеты .
sudo dpkg -P pritunl-client-gtk
Только если это сработает.
sudo apt update && sudo apt-get clean && sudo apt-get autoclean
вторая команда удаляет частично загруженные пакеты, третья удаляет пакеты в / var / cache / apt / archives, которые больше не могут быть загружены, и которые в значительной степени бесполезны
sudo dpkg --configure -a && sudo apt -f install
Если вам повезет и эти работы сделают ваше обновление готовым
sudo apt full-upgrade