after installing gunicorn3 how to fix Sub-process /usr/bin/dpkg returned an error code (1)
By Sarah Rodriguez •
root@vps292598:~# sudo apt upgrade
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.
8 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.5 (3.5.2-2ubuntu0~16.04.12) ...
/var/lib/dpkg/info/python3.5.postinst: 9: /var/lib/dpkg/info/python3.5.postinst: /usr/bin/python3.5: not found
dpkg: error processing package python3.5 (--configure): subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of python3: python3 depends on python3.5 (>= 3.5.1-2~); however: Package python3.5 is not configured yet.
dpkg: error processing package python3 (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-pkg-resources: python3-pkg-resources depends on python3:any (>= 3.3.2-2~); however: Package python3 is not configured yet.
dpkg: error processing package python3-pkg-resources (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-setuptools: python3-setuptools depends on python3-pkg-resources (= 20.7.0-1); however: Package python3-pkg-resources is not configured yet. python3-setuptools depends on python3:any (>= 3.3.2-2~); however: Package python3 is not configured yet.
dpkg: error processing package python3-setuptools (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-gunicorn: python3-gunicorn depends on python3-pkg-resources; however: Package python3-pkg-resources is not configured yet. python3-gunicorn depends on python3-setuptools; however: Package python3-setuptools is not configured yet. python3-gunicorn depends on python3:any (>= 3.3.2-2~); however: Package python3 is not configured yet.
dpkg: error processing package python3-gunicorn (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gunicorn3: gunicorn3 depends on python3-gunicorn (= 19.4.5-1ubuntu1.1); however: Package python3-gunicorn is not configured yet. gunicorn3 depends on python3:any (>= 3.2~); however: Package python3 is not configured yet.
dpkg: error processing package gunicorn3 (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-wheel: python3-wheel depends on python3:any (>= 3.3.2-2~); however: Package python3 is not configured yet.
dpkg: error processing package python3-wheel (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dh-python: dh-python depends on python3:any (>= 3.3.2-2~); however: Package python3 is not configured yet.
dpkg: error processing package dh-python (--configure): dependency problems - leaving unconfigured
Errors were encountered while processing: python3.5 python3 python3-pkg-resources python3-setuptools python3-gunicorn gunicorn3 python3-wheel dh-python
E: Sub-process /usr/bin/dpkg returned an error code (1) 1 Answer
Before installing gunicorn, it might make sense to ensure Python3 is properly installed and configured:
$ sudo apt install -f --reinstall python3 python3.5 python3-minimal python3.5-minimal libpython3.5-minimalIf this completes without a problem, then you can try to install the gunicorn package.