Tuesday, August 14, 2018

apt - Package management broken, many "[Errno 2] No such file or directory" errors

Yesterday I had been trying to update intel drivers and rebooted. I don't remember or have the commands I had used but since the reboot I have been unable to install any software or attempt to fix my computer. I'm still relatively new to Ubuntu, and I do not know what I messed up, though I believe it has to do with python version issues.


$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libc-ares2 libjs-bootstrap libjs-excanvas libjs-jquery-flot
libjs-jquery-ui libjs-jquery-ui-theme-smoothness libjs-leaflet
libjs-requirejs libjs-requirejs-text libllvm6.0:i386
libopenscenegraph-3.4-131 libqt5opengl5 linux-headers-4.15.0-34
linux-headers-4.15.0-34-generic linux-image-4.15.0-33-generic
linux-image-4.15.0-34-generic linux-modules-4.15.0-33-generic
linux-modules-4.15.0-34-generic linux-modules-extra-4.15.0-33-genericlinux-modules-extra-4.15.0-34-generic node-sprintf-js nodejs
nodejs-doc
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 47 not fully
installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3 (3.6.5-3ubuntu1) ...
running python rtupdate hooks for python3.6...
E: py3compile:183: cannot create directory /usr/share/hplip/ui5/__pycache__:
FileNotFoundError(2, 'No such file or directory')
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/aboutdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/aboutdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/aligndialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/aligndialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/cleandialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/cleandialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/colorcaldialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/colorcaldialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devicesetupdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devicesetupdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/deviceuricombobox.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devmgr5.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devmgr5_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/devmgr_ext.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/fabgrouptable.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/fabnametable.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/fabwindow.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/fabwindow_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/faxsetupdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/faxsetupdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/filetable.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/firmwaredialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/firmwaredialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/infodialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/infodialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/linefeedcaldialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/linefeedcaldialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/loadpapergroupbox.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/makecopiesdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/makecopiesdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/mimetypesdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/mimetypesdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/nodevicesdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/nodevicesdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/plugindiagnose.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/plugindiagnose_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/plugindialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/plugindialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/pluginlicensedialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/pluginlicensedialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/pqdiagdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/pqdiagdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printernamecombobox.py'
[Errno 2] No such file or directory:'/usr/share/hplip/ui5/printsettings_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printsettingsdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printsettingsdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printsettingstoolbox.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printtestpagedialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/printtestpagedialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/queuesconf.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/readonlyradiobutton.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/sendfaxdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/sendfaxdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/settingsdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/settingsdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/setupdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/setupdialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/setupdialog_base5.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/systemtray.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/systrayframe.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/systrayframe_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/ui_utils.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/upgradedialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/upgradedialog_base.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/wifisetupdialog.py'
[Errno 2] No such file or directory: '/usr/share/hplip/ui5/wifisetupdialog_base.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
update-notifier-common:
update-notifier-common depends on python3:any; however: Package
python3 is not configured yet.
dpkg: error processing package update-notifier-common
(--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-web-launchers:
ubuntu-web-launchers depends on python3; however: Package python3 is
not configured yet.
dpkg: error processing package ubuntu-web-launchers
(--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-brlapi:
python3-brlapi depends on python3 (<< 3.7); however:
Package python3 is not configured yet.
python3-brlapi depends on python3 (= 3.6~); however: Package
python3 is not configured yet.
python3-brlapi depends on python3:any (= 3.2~); however: Package
python3 is not configured yet.
Errors were encountered while processing:
python3 update-notifier-common ubuntu-web-launchers python3-brlapi
lutris python3-commandnotfound language-selector-common python3-update-manager
python3-dev python3-wadllib gnome-shell apport-gtk apturl netplan.io
command-not-found ubuntu-release-upgrader-core python3-apport
gnome-terminal ubuntu-session xserver-xorg python3-problem-report
ubuntu-drivers-common python3-uno software-properties-gtk
apturl-common nplan update-notifier gnome-software python3-pip
unattended-upgrades apport update-manager python3-software-properties
gnome-menus language-selector-gnome networkd-dispatcher python3-distupgrade
xorg software-properties-common nautilus-extension-gnome-terminal
ubuntu-release-upgrader-gtk update-manager-core ubuntu-software
python3-apt gnome-software-plugin-snap gdm3 gnome-control-center
E: Sub-process /usr/bin/dpkg returned an error code (1)

I fear I have crippled my system and may need to do a fresh install.


Here is /etc/sources.list


# deb cdrom:[Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ bionic main restricted
# See help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution. deb us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution. deb us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team. deb us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src us.archive.ubuntu.com/ubuntu/ bionic universe deb us.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src us.archive.ubuntu.com/ubuntu/ bionic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team. deb us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src us.archive.ubuntu.com/ubuntu/ bionic multiverse deb us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team. deb us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted
universe multiverse
# deb-src /us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb archive.canonical.com/ubuntu bionic partner
# deb-src archive.canonical.com/ubuntu bionic partner
deb security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src security.ubuntu.com/ubuntu bionic-security main restricted deb security.ubuntu.com/ubuntu bionic-security
universe
# deb-src security.ubuntu.com/ubuntu bionic-security universe deb security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src security.ubuntu.com/ubuntu bionic-security multiverse

The problem came up after updating drivers, it did not come up when installing hplip, and the problem did not go away after removing hplip.

No comments:

Post a Comment

11.10 - Can&#39;t boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...