Score:2

E: Sub-process /usr/bin/dpkg returned an error code (1) (When installing sqlite on a raspberry pi running ubuntu 18.04)

us flag
Joe

I am trying to install sqlite onto the raspberry pi I have been using. The following error code appears and any attempts to fix it have failed so far. I have tried reinstalling python3.6, purging the named modules, attempted changing the PYTHONHOME as well as many other commands seen on similar forums. Please let me know if there are any ideas for fixing this error.

Reading package lists... Done
Building dependency tree
Reading state information... Done
sqlite is already the newest version (2.8.17-14fakesync1).
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 python-lzma (0.5.3-3) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package python-lzma (--configure):
installed python-lzma package post-installation script subprocess returned error exit status 1
Setting up python-sqlitecachec (1.1.4-1) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package python-sqlitecachec (--configure):
installed python-sqlitecachec package post-installation script subprocess returned error exit status 1
Setting up python-pycurl (7.43.0.1-0.2) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package python-pycurl (--configure):
installed python-pycurl package post-installation script subprocess returned error exit status 1
Setting up python-minimal (2.7.15~rc1-1) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package python-minimal (--configure):
installed python-minimal package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
                                                           dpkg: dependency problems prevent configuration of python-urlgrabber:
python-urlgrabber depends on python-pycurl; however:
Package python-pycurl is not configured yet.

No apport report written because MaxReports is reached already
                                                           dpkg: error processing package python-urlgrabber (--configure):
dependency problems - leaving unconfigured
Setting up python-sqlite (1.0.1-12) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package python-sqlite (--configure):
installed python-sqlite package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
                                                           Setting up apport (2.20.9-0ubuntu7.24) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package apport (--configure):
installed apport package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
                                                           Setting up python-libxml2 (2.9.4+dfsg1-6.1ubuntu1.4) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package python-libxml2 (--configure):
installed python-libxml2 package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
                                                           dpkg: dependency problems prevent configuration of yum:
yum depends on python-libxml2; however:
Package python-libxml2 is not configured yet.
yum depends on python-lzma; however:
Package python-lzma is not configured yet.
yum depends on python-sqlite; however:
Package python-sqlite is not configured yet.
yum depends on python-sqlitecachec; however:
Package python-sqlitecachec is not configured yet.
yum depends on python-urlgrabber; however:
Package python-urlgrabber is not configured yet.

dpkg: error processing package yum (--configure):
dependency problems - leaving unconfigured
Setting up python-lockfile (1:0.12.2-2) ...
No apport report written because MaxReports is reached already
                                                           Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package python-lockfile (--configure):
installed python-lockfile package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
                                                           Setting up python-rpm (4.14.1+dfsg1-2) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package python-rpm (--configure):
installed python-rpm package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
                                                           Errors were encountered while processing:
python-lzma
python-sqlitecachec
python-pycurl
python-minimal
python-urlgrabber
python-sqlite
apport
python-libxml2
yum
python-lockfile
python-rpm
E: Sub-process /usr/bin/dpkg returned an error code (1)

(This is my first time posting so please let me know if there is anything I can do to be more helpful)

in flag
this link may be of help https://stackoverflow.com/questions/19292957/how-can-i-troubleshoot-python-could-not-find-platform-independent-libraries-pr
Joe avatar
us flag
Joe
Hi, thank you very much for this, I have however already seen this page, would you have any other suggestions?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.