package python3 3.6.5-3ubuntu1 failed to install/upgrade: installed python3 package post-installation script subprocess returned error exit status 4
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python3-defaults (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
"sudo apt upgrade" produced this output:
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.
4 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...
E: py3compile:183: cannot create directory /usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
[Errno 2] No such file or directory: '/usr/share/
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-
python3-
Package python3 is not configured yet.
dpkg: error processing package python3-
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
No apport report written because the error message indicates its a followup error from a previous failure.
gnome-menus depends on python3:any (>= 3.1~); however:
Package python3 is not configured yet.
dpkg: error processing package gnome-menus (--configure):
dependency problems - leaving triggers unprocessed
dpkg: dependency problems prevent configuration of update-
update-
Package python3 is not configured yet.
update-
Package python3-
dpkg: error processing package update-manager-core (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
python3
python3-
update-manager
gnome-menus
update-
E: Sub-process /usr/bin/dpkg returned an error code (1)
-------
1) lsb_release -rd
Description: Ubuntu 18.04 LTS
Release: 18.04
2) I didn't specify a package, just did and apt update and apt upgrade
3) I expected it to work.
4) Instead of it working, I got the above error message. Minutes later I got a system error and followed the instructions to report it and that brought me here.
ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: python3 3.6.5-3ubuntu1
ProcVersionSign
Uname: Linux 4.15.0-24-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
Date: Thu Jul 12 10:07:27 2018
ErrorMessage: installed python3 package post-installation script subprocess returned error exit status 4
InstallationDate: Installed on 2018-04-27 (76 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
Python3Details: /usr/bin/python3.6, Python 3.6.5, python3-minimal, 3.6.5-3ubuntu1
PythonDetails: /usr/bin/python2.7, Python 2.7.15rc1, python-minimal, 2.7.15~rc1-1
RelatedPackageV
dpkg 1.19.0.5ubuntu2
apt 1.6.2
SourcePackage: python3-defaults
Title: package python3 3.6.5-3ubuntu1 failed to install/upgrade: installed python3 package post-installation script subprocess returned error exit status 4
UpgradeStatus: No upgrade log present (probably fresh install)
Temporary solution that worked for me:
sudo mkdir /usr/share/ hplip/ui5
sudo apt install --reinstall hplip hplip-data
sudo apt install --reinstall python3