ankur@ahkyp:~$ sudo apt update && sudo apt upgrade
Hit:1 http://ppa.launchpad.net/linrunner/tlp/ubuntu bionic InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
11 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up python3 (3.6.5-3ubuntu1) ...
running python rtupdate hooks for python3.6...
[Errno 20] Not a directory: '/usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/__pycache__/__init__.cpython-36.pyc.139794777489248'
[Errno 20] Not a directory: '/usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/__pycache__/appactivatable.cpython-36.pyc.139794777486512'
[Errno 20] Not a directory: '/usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/__pycache__/capture.cpython-36.pyc.139794777544576'
[Errno 20] Not a directory: '/usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/__pycache__/filelookup.cpython-36.pyc.139794777508864'
[Errno 20] Not a directory: '/usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/__pycache__/functions.cpython-36.pyc.139794777544576'
[Errno 20] Not a directory: '/usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/__pycache__/library.cpython-36.pyc.139794777487664'
[Errno 20] Not a directory: '/usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/__pycache__/linkparsing.cpython-36.pyc.139794777508864'
[Errno 20] Not a directory: '/usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/__pycache__/manager.cpython-36.pyc.139794777544576'
[Errno 20] Not a directory: '/usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/__pycache__/outputpanel.cpython-36.pyc.139794777507136'
[Errno 20] Not a directory: '/usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/__pycache__/windowactivatable.cpython-36.pyc.139794777158896'
[Errno 20] Not a directory: '/usr/lib/x86_64-linux-gnu/gedit/plugins/pythonconsole/__pycache__/__init__.cpython-36.pyc.139794777505840'
[Errno 20] Not a directory: '/usr/lib/x86_64-linux-gnu/gedit/plugins/pythonconsole/__pycache__/config.cpython-36.pyc.139794776836952'
[Errno 20] Not a directory: '/usr/lib/x86_64-linux-gnu/gedit/plugins/pythonconsole/__pycache__/console.cpython-36.pyc.139794777505840'
error running python rtupdate hook gedit
[Errno 2] No such file or directory: '/usr/share/hplip/pcard/__init__.py'
[Errno 2] No such file or directory: '/usr/share/hplip/pcard/photocard.py'
[Errno 2] No such file or directory: '/usr/share/hplip/prnt/__init__.py'
[Errno 2] No such file or directory: '/usr/share/hplip/prnt/colorcal.py'
[Errno 2] No such file or directory: '/usr/share/hplip/prnt/cups.py'
[Errno 2] No such file or directory: '/usr/share/hplip/prnt/ldl.py'
[Errno 2] No such file or directory: '/usr/share/hplip/prnt/pcl.py'
error running python rtupdate hook hplip-data
dpkg: error processing package python3 (--configure):
installed python3 package post-installation script subprocess returned error exit status 4
dpkg: dependency problems prevent configuration of python3-update-manager:
python3-update-manager depends on python3:any (>= 3.3.2-2~); however:
Package python3 is not configured yet.
dpkg: error processing package python3-update-manager (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of netplan.io:
netplan.io depends on python3; however:
Package python3 is not configured yet.
dpkg: error processing package netplan.io (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-core:
ubuntu-release-upgrader-core depends on python3:any (>= 3.2~); however:
Package python3 is not configured yet.
dpkg: error processing package ubuntu-release-upgrader-core (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nplan:
nplan depends on netplan.ioNo apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
; however:
Package netplan.io is not configured yet.
dpkg: error processing package nplan (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of unattended-upgrades:
unattended-upgrades depends on python3; however:
Package python3 is not configured yet.
dpkg: error processing package unattended-upgrades (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager:
update-manager depends on python3:any (>= 3.3.2-2~); however:
Package python3 is not configured yet.
dpkg: error processing package update-manager (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent processing triggers for gnome-menus:
gnome-menus depends on python3:any (>= 3.1~); however:
Package python3 is not configured yet.
dpkg: error processing package gnome-menus (--configure):
dependency probNo apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
lems - leaving triggers unprocessed
dpkg: dependency problems prevent configuration of python3-distupgrade:
python3-distupgrade depends on python3:any (>= 3.3.2-2~); however:
Package python3 is not configured yet.
python3-distupgrade depends on python3-update-manager (>= 1:0.196.2~); however:
Package python3-update-manager is not configured yet.
dpkg: error processing package python3-distupgrade (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent processing triggers for ufw:
ufw depends on python3:any (>= 3.3.2-2~); however:
Package python3 is not configured yet.
dpkg: error processing package ufw (--configure):
dependency problems - leaving triggers unprocessed
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-gtk:
ubuntu-release-upgrader-gtk depends on ubuntu-release-upgrader-core (= 1:18.04.21); however:
Package ubuntu-release-upgrader-core is not configured yet.
ubuntNo apport report written because MaxReports is reached already
u-release-upgrader-gtk depends on update-manager; however:
Package update-manager is not configured yet.
ubuntu-release-upgrader-gtk depends on python3-distupgrade (= 1:18.04.21); however:
Package python3-distupgrade is not configured yet.
dpkg: error processing package ubuntu-release-upgrader-gtk (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager-core:
update-manager-core depends on python3:any (>= 3.2~); however:
Package python3 is not configured yet.
update-manager-core depends on python3-update-manager (= 1:18.04.11.3); however:
Package python3-update-manager is not configured yet.
update-manager-core depends on ubuntu-release-upgrader-core (>= 1:18.04.9); however:
Package ubuntu-release-upgrader-core is not configured yet.
dpkg: error processing package update-manager-core (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-apt:
python3-apt depends on python3 (<< 3.7); however:
Package python3 is not configured yet.
python3-apt depends on python3 (>= 3.6~); however:
Package python3 is not configured yet.
python3-apt depends on python3:any (>= 3.3.2-2~); however:
Package python3 is not configured yet.
dpkg: error processing package python3-apt (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
python3
python3-update-manager
netplan.io
ubuntu-release-upgrader-core
nplan
unattended-upgrades
update-manager
gnome-menus
python3-distupgrade
ufw
ubuntu-release-upgrader-gtk
update-manager-core
python3-apt
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
看来你已经从 HP 网站安装了二进制 HPLIP,你可以按照卸载程序来自这个答案。
可以通过删除有问题的文件/目录来解决 gedit 的问题:
sudo rm -rf /usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools
sudo rm -rf /usr/lib/x86_64-linux-gnu/gedit/plugins/pythonconsole
然后重新安装它们的父包(gedit
):
sudo apt-get install --reinstall gedit
如果这不起作用,请尝试手动重新安装
cd ~/Downloads
apt-get download gedit
sudo dpkg -i --force-all gedit*.deb
然后恢复正常的包安装:
sudo dpkg --configure -a
sudo apt-get install -f
sudo apt-get upgrade