简体   繁体   中英

Cannot update anymore my Ubuntu 12.04: python 2.7 circular dependecy?

I'm trying to update my Ubuntu 12.04. But it's not possible anymore, because almost any package that I try to update I receive this error:

$ sudo apt-get install cups

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libvisio-0.0-0 libmspub-0.0-0 libboost-date-time1.46.1 libcmis-0.3-3 ttf-sil-gentium-basic libcdr-0.0-0 liborcus-0.6-0 libreoffice-report-builder-bin
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  cups-bsd cups-client cups-common
Suggested packages:
  cups-pdf xpp
The following packages will be upgraded:
  cups cups-bsd cups-client cups-common
4 upgraded, 0 newly installed, 0 to remove and 256 not upgraded.
6 not fully installed or removed.
Need to get 0 B/2317 kB of archives.
After this operation, 54.3 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Preconfiguring packages ...
Setting up python2.7-minimal (2.7.3-0ubuntu3.5) ...
Traceback (most recent call last):
  File "/usr/lib/python2.7/site.py", line 562, in <module>
    main()
  File "/usr/lib/python2.7/site.py", line 544, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python2.7/site.py", line 271, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/lib/python2.7/site.py", line 246, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/lib/python2.7/site.py", line 236, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/lib/python2.7/sysconfig.py", line 577, in get_config_var
    return get_config_vars().get(name)
  File "/usr/lib/python2.7/sysconfig.py", line 476, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/usr/lib/python2.7/sysconfig.py", line 337, in _init_posix
    makefile = _get_makefile_filename()
  File "/usr/lib/python2.7/sysconfig.py", line 331, in _get_makefile_filename
    return os.path.join(get_path('platstdlib').replace("/usr/local","/usr",1), "config" + (sys.pydebug and "_d" or ""), "Makefile")
AttributeError: 'module' object has no attribute 'pydebug'
dpkg: error processing python2.7-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              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 MaxReports is reached already
                                                              Errors were encountered while processing:
 python2.7-minimal
 python-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)

If i try to reinstall:

$ sudo apt-get install --reinstall python2.7

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libvisio-0.0-0 libmspub-0.0-0 libboost-date-time1.46.1 libcmis-0.3-3 ttf-sil-gentium-basic libcdr-0.0-0 liborcus-0.6-0 libreoffice-report-builder-bin
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 260 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python2.7-minimal (2.7.3-0ubuntu3.5) ...
Traceback (most recent call last):
  File "/usr/lib/python2.7/site.py", line 562, in <module>
    main()
  File "/usr/lib/python2.7/site.py", line 544, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python2.7/site.py", line 271, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/lib/python2.7/site.py", line 246, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/lib/python2.7/site.py", line 236, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/lib/python2.7/sysconfig.py", line 577, in get_config_var
    return get_config_vars().get(name)
  File "/usr/lib/python2.7/sysconfig.py", line 476, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/usr/lib/python2.7/sysconfig.py", line 337, in _init_posix
    makefile = _get_makefile_filename()
  File "/usr/lib/python2.7/sysconfig.py", line 331, in _get_makefile_filename
    return os.path.join(get_path('platstdlib').replace("/usr/local","/usr",1), "config" + (sys.pydebug and "_d" or ""), "Makefile")
AttributeError: 'module' object has no attribute 'pydebug'
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.
                                                                                                          dpkg: dependency problems prevent configuration of python2.7:
 python2.7 depends on python2.7-minimal (= 2.7.3-0ubuntu3.5); however:
  Package python2.7-minimal is not configured yet.
dpkg: error processing python2.7 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of python:
 python depends on python2.7 (>= 2.7.3); however:
  Package python2.7 is not configured yet.
 python depends on python-minimal (= 2.7.3-0ubuntu2.2); however:
  Package python-minimal is not configured yet.
dpkg: error processing python (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpython2.7:
 libpython2.7 depends on python2.7 (= 2.7.3-0ubuntu3.5); however:
  Package python2.7 is not configured yet.
dpkg: error processing libpython2.7 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                                                                                                            dpkg: dependency problems prevent configuration of python-uno:
 python-uno depends on python (<< 2.8); however:
  Package python is not configured yet.
 python-uno depends on python:any (>= 2.7.3-0ubuntu2~); however:
  Package python is not configured yet.
 python-uno depends on python (>= 2.7~); however:
  Package python is not configured yet.
 python-uno depends on python2.7; however:
  Package python2.7 is not configured yet.
 python-uno depends on libpython2.7 (>= 2.7); however:
  Package libpython2.7 is not configured yet.
dpkg: error processing python-uno (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 python2.7-minimal
 python-minimal
 python2.7
 python
 libpython2.7
 python-uno
E: Sub-process /usr/bin/dpkg returned an error code (1)

I try another solutions , but none of them work.

我可能建议您尝试安装以下软件包:

sudo apt-get install libpython2.7 python2.7 python2.7-minimal python-minimal python2.7-dev

你可以试试:

sudo dpkg -i /var/cache/apt/archives/python2.7-minimal*deb

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM