1
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

It seems that you have installed binary HPLIP from HP site, you can follow uninstallation procedure from this answer.

Problems with gedit may be fixed by removing problematic files/derectories:

sudo rm -rf /usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools
sudo rm -rf /usr/lib/x86_64-linux-gnu/gedit/plugins/pythonconsole

And then reinstall their parent package (gedit):

sudo apt-get install --reinstall gedit

if this does not work try to reinstall it manually

cd ~/Downloads
apt-get download gedit
sudo dpkg -i --force-all gedit*.deb

Then resume normal package installation:

sudo dpkg --configure -a
sudo apt-get install -f
sudo apt-get upgrade
  • I can install packages now but still the keyboard is not working, only usb keyboard works and not the laptop keyboard – neutron Jul 20 '18 at 12:37
  • maybe its my hardware problem or some bios problem. some keys work like brightness volume etc – neutron Jul 20 '18 at 12:38
  • but most of them don't. usually the ones at the top work like the f keys – neutron Jul 20 '18 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.