更新到新的 bionic beaver Ubuntu 18.04 后,我遇到以下错误。
每当我尝试安装包时,都会出现以下错误:
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libunity-scopes1.0 : Depends: libnet-cpp2 (>= 1.1.0+15.04.20150305) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我试过了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:
gdal-data libarmadillo-dev libarmadillo8 libarpack2-dev libblas-dev libbotan-1.10-1 libdbus-cpp5 libdns-export169 libdns169 libepsilon-dev libevdev-dev libfreexl-dev libfyba-dev
libfyba0 libgdal20 libgeotiff2 libicu-le-hb0:i386 libisc-export166 libisc166 libjs-async libjs-inherits libjs-node-uuid libjson-c-dev libkml-dev libkmlconvenience1 libkmlregionator1
libkmlxsd1 liblapack-dev libllvm5.0:i386 liblzma-dev libmediascanner-2.0-4 libminizip-dev libmirclient-dev libmircommon-dev libmircookie-dev libmircookie2 libmircore-dev libnfs8
libogdi3.2-dev libopenjp2-7-dev libpoppler-dev libpoppler-private-dev libproj-dev libprotobuf-dev libqhull-dev libqhull-r7 libqhull7 libqt5systeminfo5 libre2-3 libruby2.3
libsuperlu-dev libsuperlu5 libtiffxx5 libunity-api-dev libunity-api0 liburiparser-dev libuv1-dev libxkbcommon-dev libzmqpp4 linux-headers-4.15.0-10 linux-headers-4.15.0-10-generic
linux-image-4.15.0-10-generic linux-image-extra-4.15.0-10-generic linux-signed-image-4.15.0-10-generic myspell-hr node-abbrev node-ansi node-ansi-color-table node-archy node-async
node-balanced-match node-block-stream node-brace-expansion node-builtin-modules node-combined-stream node-concat-map node-cookie-jar node-delayed-stream node-forever-agent
node-form-data node-fs.realpath node-fstream node-fstream-ignore node-github-url-from-git node-glob node-graceful-fs node-gyp node-hosted-git-info node-inflight node-inherits
node-ini node-is-builtin-module node-isexe node-json-stringify-safe node-lockfile node-lru-cache node-mime node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt
node-normalize-package-data node-npmlog node-once node-osenv node-path-is-absolute node-pseudomap node-qs node-read node-read-package-json node-request node-retry node-rimraf
node-semver node-sha node-slide node-spdx-correct node-spdx-expression-parse node-spdx-license-ids node-tar node-tunnel-agent node-underscore node-validate-npm-package-license
node-which node-wrappy node-yallist nodejs-dev npm ruby2.3 ruby2.3-dev ttf-ubuntu-font-family
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
libunity-scopes1.0
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 2.836 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 1076823 files and directories currently installed.)
Removing libunity-scopes1.0:amd64 (1.0.8+17.04.20170116-0ubuntu3) ...
Traceback (most recent call last):
File "/usr/bin/click", line 37, in <module>
import click_package as click
ModuleNotFoundError: No module named 'click_package'
dpkg: error processing package libunity-scopes1.0:amd64 (--remove):
installed libunity-scopes1.0:amd64 package pre-removal script subprocess returned error exit status 1
Errors were encountered while processing:
libunity-scopes1.0:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
此后,我一直收到以下错误。
Traceback (most recent call last):
File "/usr/bin/click", line 37, in <module>
import click
ImportError: No module named 'click'
我尝试在这个论坛上寻找解决方案,但都无济于事。