Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Something went wrong while updating to ubuntu 12.04 to 12.10:

root@ely:/sys/bus/usb/devices# dpkg -l | grep ^i[HUFW]
iU  libpython2.7                           2.7.3-0ubuntu3.4                        Shared Python runtime library (version 2.7)
iU  python                                 2.7.3-0ubuntu2.2                        interactive high-level object-oriented language (default version)
iU  python-all                             2.7.3-0ubuntu2.2                        package depending on all supported Python runtime versions
iU  python-all-dev                         2.7.3-0ubuntu2.2                        package depending on all supported Python development packages
iU  python-dev                             2.7.3-0ubuntu2.2                        header files and a static library for Python (default)
iU  python-minimal                         2.7.3-0ubuntu2.2                        minimal subset of the Python language (default version)
iU  python2.7                              2.7.3-0ubuntu3.4                        Interactive high-level object-oriented language (version 2.7)
iU  python2.7-dev                          2.7.3-0ubuntu3.4                        Header files and a static library for Python (v2.7)
iF  python2.7-minimal                      2.7.3-0ubuntu3.4                        Minimal subset of the Python language (version 2.7)

When I try to configure the packages python2.7-minimal and python-minimal, I get what looks like a circular dependency:

root@ely:~# sudo dpkg --configure python2.7-minimal
dpkg: dependency problems prevent configuration of python2.7-minimal:
 python2.7-minimal depends on python-minimal (>= 2.6.6-3+squeeze1); however:
  Package python-minimal is not configured yet.
dpkg: error processing python2.7-minimal (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python2.7-minimal


root@ely:~# sudo dpkg --configure python-minimal
dpkg: dependency problems prevent configuration of python-minimal:
 python-minimal depends on python2.7-minimal (>= 2.7.3); however:
  Package python2.7-minimal is not configured yet.
dpkg: error processing python-minimal (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python-minimal

How do I resolve those python2.7-minimal <-> python.minimal dependencies? Secondly, how do I unpack or configure the iU and iF -marked packages? I can't reconfigure nor install anything in this instance. Thanks.

Update: I purged all packages above, except python-minimal, which is essential, and can't be purged. Upon reinstall of any of the packages, I get:

Processing triggers for man-db ...
Setting up python2.7-minimal (2.7.3-0ubuntu3.4) ...
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site.py", line 563, in <module>
    main()
  File "/usr/local/lib/python2.7/site.py", line 545, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/local/lib/python2.7/site.py", line 278, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/local/lib/python2.7/site.py", line 253, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/local/lib/python2.7/site.py", line 243, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/local/lib/python2.7/sysconfig.py", line 520, in get_config_var
    return get_config_vars().get(name)
  File "/usr/local/lib/python2.7/sysconfig.py", line 419, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/usr/local/lib/python2.7/sysconfig.py", line 298, in _init_posix
    raise IOError(msg)
IOError: invalid Python installation: unable to open /usr/local/include/python2.7/pyconfig.h     (No such file or directory)
    dpkg: error processing python2.7-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-minimal:
 python-minimal depends on python2.7-minimal (>= 2.7.3); however:
  Package python2.7-minimal is not configured yet.
dpkg: error processing python-minimal (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 python2.7-minimal
 python-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)

Now I am back to the state:

root@ely:~# dpkg -l | grep ^i[HUFW]
iU  python-minimal                         2.7.3-0ubuntu2.2                        minimal     subset of the Python language (default version)
iF  python2.7-minimal                      2.7.3-0ubuntu3.4                        Minimal subset of the Python language (version 2.7)

So I think the culprit is the unpacked python-minimal library. How do I unpack it or resolve this issue?

share|improve this question
    
Can't you just purge them all, then re-install all of them? –  MariusMatutiae Dec 2 '13 at 7:26
    
@MariusMatutiae - see edit above. –  Charles Pehlivanian Dec 2 '13 at 15:35
    
Try sudo apt-get --reinstall install python2.7-minimal –  MariusMatutiae Dec 2 '13 at 15:53
    
No, it complains about an unmet dependency python-dev depends on python2.7-dev which is not going to be installed. Can't install neither python-dev python2.7-dev - I get the "no apport report written..." error above. I think the problem is that python-minimal is in unconfigured state, I can't configure it. apt and dpkg themselves may depend on it? –  Charles Pehlivanian Dec 2 '13 at 22:21
    
Can anyone help - python.minimal appears to be unconfigured. It is an essential package, and the distro is broken while in this state. –  Charles Pehlivanian Dec 4 '13 at 18:29

1 Answer 1

I have the similar problem.

and I also found when I run python:

# python
ImportError: No module named site

but if use the default environment variable is work

# python -E
Python 2.7.3 (default, Mar 13 2014, 11:03:55) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

so I set the $PYTHONPATH and $PYTHONHOME both to /usr/lib/python2.7

# export PYTHONPATH=/usr/lib/python2.7
# export PYTHONHOME=/usr/lib/python2.7

then install python again

# aptitude install python2.7

I guess the apt-get/aptitude depand on python, but it(python) was broken.

Hope this help!

share|improve this answer

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.