Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

12.04 LTS, on a dell mini 10. Install stable until about a week ago. Updated about 1x a week, sometimes more often. Several days ago, I booted up and the system was no longer working correctly. All these symptoms occurred simultaneously: Cannot run (exit on opening, every time): Update manager, software center, ubuntuOne, libreOffice. Vinagre autostarts on boot, no explanation, not set to startup with Ubuntu.

Using apt-get to fix install results in the following:

maura@pandora:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libtelepathy-farstream2
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  gwibber gwibber-service kde-runtime-data software-center
Suggested packages:
  gwibber-service-flickr gwibber-service-digg gwibber-service-statusnet
  gwibber-service-foursquare gwibber-service-friendfeed gwibber-service-pingfm
  gwibber-service-qaiku unity-lens-gwibber
The following packages will be upgraded:
  gwibber gwibber-service kde-runtime-data software-center
4 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
20 not fully installed or removed.
Need to get 0 B/5,682 kB of archives.
After this operation, 177 kB of additional disk space will be used.
Do you want to continue [Y/n]? 
debconf: Perl may be unconfigured (Can't locate Scalar/Util.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/lib/perl/5.14/Hash/Util.pm line 9.
BEGIN failed--compilation aborted at /usr/lib/perl/5.14/Hash/Util.pm line 9.
Compilation failed in require at /usr/share/perl/5.14/fields.pm line 122.
Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line 10.
Compilation failed in require at (eval 1) line 4.
BEGIN failed--compilation aborted at (eval 1) line 4.
) -- aborting
(Reading database ... 242672 files and directories currently installed.)
Preparing to replace gwibber 3.4.1-0ubuntu1 (using .../gwibber_3.4.2-0ubuntu1_i386.deb) ...
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
dpkg: error processing /var/cache/apt/archives/gwibber_3.4.2-0ubuntu1_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 27, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 27, in <module>
    import logging
ImportError: No module named logging
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Preparing to replace gwibber-service 3.4.1-0ubuntu1 (using .../gwibber-service_3.4.2-0ubuntu1_all.deb) ...
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
dpkg: error processing /var/cache/apt/archives/gwibber-service_3.4.2-0ubuntu1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 27, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 27, in <module>
    import logging
ImportError: No module named logging
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Preparing to replace kde-runtime-data 4:4.8.3-0ubuntu0.1 (using .../kde-runtime-data_4%3a4.8.4-0ubuntu0.1_all.deb) ...
Unpacking replacement kde-runtime-data ...
dpkg: error processing /var/cache/apt/archives/kde-runtime-data_4%3a4.8.4-0ubuntu0.1_all.deb (--unpack):
 trying to overwrite '/usr/share/sounds', which is also in package sound-theme-freedesktop 0.7.pristine-2
dpkg-deb (subprocess): subprocess data was killed by signal (Broken pipe)
dpkg-deb: error: subprocess <decompress> returned error exit status 2
Preparing to replace python-crypto 2.4.1-1 (using .../python-crypto_2.4.1-1_i386.deb) ...
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
dpkg: error processing /var/cache/apt/archives/python-crypto_2.4.1-1_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 27, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 27, in <module>
    import logging
ImportError: No module named logging
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Preparing to replace software-center 5.2.2.2 (using .../software-center_5.2.4_all.deb) ...
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
dpkg: error processing /var/cache/apt/archives/software-center_5.2.4_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 27, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 27, in <module>
    import logging
ImportError: No module named logging
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Preparing to replace xdiagnose 2.5 (using .../archives/xdiagnose_2.5_all.deb) ...
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 25, in <module>
    import logging
ImportError: No module named logging
dpkg: error processing /var/cache/apt/archives/xdiagnose_2.5_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 27, in <module>
    import logging
ImportError: No module named logging
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.7/dist-packages/apport/report.py", line 16, in <module>
    from xml.parsers.expat import ExpatError
  File "/usr/lib/python2.7/xml/parsers/expat.py", line 4, in <module>
    from pyexpat import *
ImportError: No module named pyexpat

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 27, in <module>
    import logging
ImportError: No module named logging
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/gwibber_3.4.2-0ubuntu1_i386.deb
 /var/cache/apt/archives/gwibber-service_3.4.2-0ubuntu1_all.deb
 /var/cache/apt/archives/kde-runtime-data_4%3a4.8.4-0ubuntu0.1_all.deb
 /var/cache/apt/archives/python-crypto_2.4.1-1_i386.deb
 /var/cache/apt/archives/software-center_5.2.4_all.deb
 /var/cache/apt/archives/xdiagnose_2.5_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
maura@pandora:~$ ^C
maura@pandora:~$ 
share|improve this question
    
Wow, you have a really bad problem that starts with Perl (not python)! Some how you need to reinstall Perl. Are you able to run this apt-get install perl --reinstall? You may have to find a way to download it manually. –  Sepero Jul 13 '12 at 9:07
add comment

2 Answers

Its seems Python is causing problem. Please try to update Python with these commands:

sudo apt-get update
sudo apt-get install python

Hope it will help. Please let me know what happend. Before reinstall it clear your cache by typing sudo apt-get clean followed by sudo apt-get autoremove. Then install python with the apt-get install command above.

share|improve this answer
    
autoremove is failing.maura@pandora:~$ sudo apt-get clean maura@pandora:~$ sudo apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: kde-runtime : Depends: kde-runtime-data (>= 4:4.8.4-0ubuntu0.1) but 4:4.8.3-0ubuntu0.1 is installed E: Unmet dependencies. Try using -f. –  BMT Jul 14 '12 at 7:41
    
Please try this sudo dpkg --configure -a it will reconfigure dependency and then install perl by typing sudo apy-get install perl. Let me know. –  Kaktarua Jul 14 '12 at 8:47
add comment

this problem is caused by a package that is bad installed or configured it gel apt-get and do not allow you to install or remove any package tray this

sudo apt-get remove mysql-server-core-5.5 the name of package that cause problem

sudo apt-get dist-upgrade

sudo apt-get -f install

share|improve this answer
1  
Welcome to Ask Ubuntu! Please avoid posting the same answer in more than one place. When tempted to do so, this typically means: (1) the answer should be customized to account for what is different about the different questions, (2) one question should be flagged for closure as a duplicate of another question (you can flag posts with 15 reputation), (3) the answer should really be a comment, or (4) the answer should be posted in the most appropriate place, and one-line comments posted on the other questions summarizing and linking to it. –  Eliah Kagan Feb 11 '13 at 20:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.