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.

Doing:

dpkg --purge "landscape-common"
(Reading database ... 125316 files and directories currently installed.)
Removing landscape-common ...
  File "/usr/bin/pyclean", line 64
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax
dpkg: error processing landscape-common (--purge):
 subprocess installed pre-removal script returned error exit status 1
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 36, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named ConfigParser
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 landscape-common

or

apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 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 landscape-common (12.05-0ubuntu2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 36, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named ConfigParser
dpkg: error processing landscape-common (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 landscape-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

or

do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [198 B]
Get:2 Upgrade tool [1,206 kB]
Fetched 1,206 kB in 0s (0 B/s)
authenticate 'raring.tar.gz' against 'raring.tar.gz.gpg'
extracting 'raring.tar.gz'
File
"/tmp/ubuntu-release-upgrader-nq83uj/DistUpgrade/DistUpgradeController.py",
line 1629, in fullUpgrade
if not self.prepare():

File
"/tmp/ubuntu-release-upgrader-nq83uj/DistUpgrade/DistUpgradeController.py",
line 441, in prepare
self._sshMagic()

File
"/tmp/ubuntu-release-upgrader-nq83uj/DistUpgrade/DistUpgradeController.py",
line 311, in _sshMagic
"Do you want to continue?") % port)

File
"/tmp/ubuntu-release-upgrader-nq83uj/DistUpgrade/DistUpgradeViewText.py",
line 216, in askYesNoQuestion
res = sys.stdin.readline().decode(ENCODING, "backslashreplace")

AttributeError: 'str' object has no attribute 'decode'
=== Command detached from window (Fri Apr 26 00:06:19 2013) ===
=== Command terminated with exit status 1 (Fri Apr 26 00:06:19 2013) ===

didn't succeed? Any ideas?

share|improve this question
    
I even can't install packages with dpkg/apt? What's goin' on here? –  1000Gbps Apr 26 '13 at 18:26

1 Answer 1

up vote 1 down vote accepted

Doing this:

update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1

will fix your Ubuntu!!!

DO NOT SET Python3 to be your default Python version!!! Or cross fingers if some app doesn't set it...

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.