0

when i run apt-get install, apt-get upgrade, apt-get -f install, it always return this :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
Need to get 0 B/333 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: error processing package unity-tweak-tool (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 unity-tweak-tool

What's wrong? I try all command like apt-get remove, purge, clean and there is no effect and still return error.

[EDIT] i try to reinstall unity tweak tool, but it returns :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
Need to get 0 B/333 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 216695 files and directories currently installed.)
Preparing to unpack .../unity-tweak-tool_0.0.6ubuntu1_all.deb ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Aborted (core dumped)
dpkg: warning: subprocess old pre-removal script returned error exit status 134
dpkg: trying script from the new package instead ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Aborted (core dumped)
dpkg: error processing archive /var/cache/apt/archives/unity-tweak-tool_0.0.6ubuntu1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 134
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Aborted (core dumped)
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 134
Errors were encountered while processing:
 /var/cache/apt/archives/unity-tweak-tool_0.0.6ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
0

Run

sudo apt-get install --reinstall unity-tweak-tool

as recommended by the error message. You have probably deleted some of the files manually and broke the package.

  • it doesn't work. i was editing my question. see the result. – dionajie Dec 26 '15 at 9:03
  • It looks like you broke a lot in your system. The easiest way is to re-install the system and never delete system files manually. – Pilot6 Dec 26 '15 at 9:28
-1

you could try this:

sudo apt-get purge unity-tweak-tool
sudo -i
sudo apt-get update --fix-missing
sudo apt-get upgrade

and it might work fine this way.

  • sudo apt-get purge unity-tweak-tool return : dpkg: error processing package unity-tweak-tool (--purge): package is in a very bad inconsistent state; you should reinstall it before attempting a removal – dionajie Dec 26 '15 at 8:58
  • Reinstall dpkg sudo apt-get install --reinstall dpkg and sudo apt-get install -f – Michael Dec 28 '15 at 7:02
  • You could try this sudo dkms-reconfigure unity-tweak-tool – Michael Jan 4 '16 at 7:58

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.