dpkg: 处理软件包 XXXX (--configure)时出
2020-06-06 本文已影响0人
生信师姐
$ sudo apt-get install snap
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
snap 已经是最新的版本了。
下列软件包是自动安装的并且现在不需要了:
apg cheese-common chromium-codecs-ffmpeg consolekit cups-pk-helper diffstat
docbook-xml docbook-xsl empathy-common folks-common gir1.2-wnck-3.0
gkbd-capplet gnome-control-center-shared-data gnome-menus
gnome-video-effects gstreamer1.0-nice hardening-includes ibus-pinyin
icoutils intel-gpu-tools java-common kate-data katepart kde-l10n-engb
kde-l10n-zhcn kde-runtime-data kdelibs-bin kdoctools libapt-pkg-perl
libarchive-zip-perl libautodie-perl libavahi-gobject0 libbaloocore4
libbaloofiles4 libbalooxapian4 libck-connector0 libclass-accessor-perl
libclone-perl libclutter-1.0-common libcogl-common libdrm-amdgpu1
libdrm-amdgpu1:i386 libedit2:i386 libemail-valid-perl libepoxy0 libevdev2
libfarstream-0.2-2 libfolks-eds25 libfolks-telepathy25 libfolks25
libgnomekbd-common libgnomekbd8 libio-pty-perl libio-string-perl
libipc-run-perl libipc-system-simple-perl libkactivities-bin
libkactivities-models1 libkactivities6 libkatepartinterfaces4 libkcmutils4
libkdeclarative5 libkdesu5 libkdewebkit5 libkdnssd4 libkemoticons4
libkexiv2-11 libkexiv2-data libkfile4 libkidletime4 libkjsembed4
libkmediaplayer4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkprintutils4
libkpty4 libkrosscore4 libkubuntu0 libkxmlrpcclient4 libllvm3.6
libllvm3.6:i386 libmission-control-plugins0 libnepomukcleaner4
libnepomukcore4abi1 libnet-dns-perl libnet-domain-tld-perl libnet-ip-perl
libntdb1 libntrack-qt4-1 libntrack0 liborcus-0.6-0 libpam-ck-connector
libparse-debianchangelog-perl libperlio-gzip-perl libplasma3
libpolkit-qt-1-1 libpoppler-qt4-4 libpyzy-1.0-0 libqapt2 libqapt2-runtime
libqca2 libqgsttools-p1 libqimageblitz4 libqmobipocket1
libqt5multimedia5-plugins libqt5multimediawidgets5 libqt5x11extras5
libsub-identify-perl libsub-name-perl libtelepathy-farstream3
libtelepathy-logger3 libtext-levenshtein-perl libtimezonemap1 libxml2-utils
nepomuk-core-data nepomuk-core-runtime ntrack-module-libnl-0
oxygen-icon-theme patchutils plasma-scriptengine-javascript python-ibus
python-ntdb python-pywapi python-tz python-unidecode python3-problem-report
sgml-data shared-desktop-ontologies signon-keyring-extension
signon-plugin-password t1utils telepathy-gabble telepathy-haze
telepathy-logger telepathy-mission-control-5 telepathy-salut ttf-dejavu-core
ttf-wqy-microhei ubuntu-system-service
Use 'apt-get autoremove' to remove them.
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 563 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
解压缩后会消耗掉 0 B 的额外空间。
您希望继续执行吗? [Y/n] y
/bin/sh: 1: /usr/sbin/dpkg-preconfigure: not found
正在设置 mime-support (3.54ubuntu1.1) ...
/var/lib/dpkg/info/mime-support.postinst: 24: /var/lib/dpkg/info/mime-support.postinst: /usr/sbin/update-mime: not found
dpkg: 处理软件包 mime-support (--configure)时出错:
子进程 已安装 post-installation 脚本 返回了错误号 127
在处理时有错误发生:
mime-support
E: Sub-process /usr/bin/dpkg returned an error code (1)
解决办法
1.$ sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old //现将info文件夹更名
2.$ sudo mkdir /var/lib/dpkg/info //再新建一个新的info文件夹
3.$ sudo apt-get update && sudo apt-get -f install //不用解释了吧
4.$ sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old //执行完上一步操作后会在新的info文件夹下生成一些文件,现将这些文件全部移到info_old文件夹下
5.$ sudo rm -rf /var/lib/dpkg/info //把自己新建的info文件夹删掉
6.$ sudo mv /var/lib/dpkg/info_old /var/lib/dpkg/info //把以前的info文件夹重新改