package python-apt 0.7.4ubuntu4 failed to install/upgrade: subprocess pre-installation script returned error exit status 1

Bug #193223 reported by Fabio Colombo
12
Affects Status Importance Assigned to Milestone
python-apt (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python-apt

I obtain this crash trying to upgrade the iso4 hardy with the kernel 2.6.24-7

ProblemType: Package
Architecture: i386
Date: Tue Feb 19 11:30:04 2008
DistroRelease: Ubuntu 8.04
ErrorMessage: subprocess pre-installation script returned error exit status 1
Package: python-apt 0.7.4ubuntu4
PackageArchitecture: i386
SourcePackage: python-apt
Title: package python-apt 0.7.4ubuntu4 failed to install/upgrade: subprocess pre-installation script returned error exit status 1
Uname: Linux blackdiamond-desktop 2.6.24-7-generic #1 SMP Thu Feb 7 01:29:58 UTC 2008 i686 GNU/Linux

Revision history for this message
Fabio Colombo (stratosphere1982) wrote :
Revision history for this message
Fabio Colombo (stratosphere1982) wrote :
Download full text (3.4 KiB)

This is what i get from upgrading..

The following packages will be upgraded:
  python-apt update-manager update-manager-core
3 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
53 not fully installed or removed.
Need to get 0B/1122kB of archives.
After this operation, 12.3kB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 120868 files and directories currently installed.)
Preparing to replace python-apt 0.7.4ubuntu4 (using .../python-apt_0.7.4ubuntu5_i386.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1593, in <module>
    main()
  File "/usr/bin/pycentral", line 1587, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1075, in run
    requested = pyversions.requested_versions_for_runtime(version_field, version_only=True)
  File "/usr/share/pycentral-data/pyversions.py", line 172, in requested_versions_for_runtime
    vinfo = parse_versions(vstring)
  File "/usr/share/pycentral-data/pyversions.py", line 58, in parse_versions
    raise ValueError, 'error parsing Python-Version attribute'
ValueError: error parsing Python-Version attribute
dpkg: error processing /var/cache/apt/archives/python-apt_0.7.4ubuntu5_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Preparing to replace update-manager 1:0.87.6 (using .../update-manager_1%3a0.87.8_all.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1593, in <module>
    main()
  File "/usr/bin/pycentral", line 1587, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1075, in run
    requested = pyversions.requested_versions_for_runtime(version_field, version_only=True)
  File "/usr/share/pycentral-data/pyversions.py", line 172, in requested_versions_for_runtime
    vinfo = parse_versions(vstring)
  File "/usr/share/pycentral-data/pyversions.py", line 58, in parse_versions
    raise ValueError, 'error parsing Python-Version attribute'
ValueError: error parsing Python-Version attribute
dpkg: error processing /var/cache/apt/archives/update-manager_1%3a0.87.8_all.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Preparing to replace update-manager-core 1:0.87.6 (using .../update-manager-core_1%3a0.87.8_i386.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1593, in <module>
    main()
  File "/usr/bin/pycentral", line 1587, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1075, in run
    requested = pyversions.requested_versions_for_runtime(version_field, version_only=True)
  File "/usr/share/pycentral-data/pyversions.py", line 172, in requested_versions_for_runtime
    vinfo = parse_versions(vstring)
  File "/usr/share/pycentral-data/pyversions.py", line 58, in parse_versions
    raise ValueError, 'error parsing Python-Version attribute'
ValueError: error parsing Python-Version attribute
dpkg: error processing /var/cache/apt/archives/update-manager-core_1%3a0.87.8_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/...

Read more...

Revision history for this message
Ioannis Stoilis (stoilis) wrote :

It happens to me too.

Revision history for this message
fork (gabriel-popa) wrote :

0.7.4ubuntu5 also

Revision history for this message
Tuomas Aavikko (taavikko) wrote :

Confirmed here also.

Revision history for this message
Mathieu Marquer (slasher-fun) wrote :

Confirming on amd64 :

Paramétrage de python-apt (0.7.4ubuntu5) ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1593, in <module>
    main()
  File "/usr/bin/pycentral", line 1587, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 982, in run
    self.pkg.byte_compile(bc_option, self.options.exclude)
  File "/usr/bin/pycentral", line 624, in byte_compile
    rt.byte_compile(files, bc_option, exclude_regex)
AttributeError: 'NoneType' object has no attribute 'byte_compile'
dpkg : erreur de traitement de python-apt (--configure) :
 le sous-processus post-installation script a retourné une erreur de sortie d'état 1

Revision history for this message
Bruce Cowan (bruce89-deactivatedaccount) wrote :

There is no need to "confirm" a bug more than once.

Revision history for this message
Lars Noodén (larsnooden) wrote : package python-apt 0.7.4ubuntu5 -- too
Download full text (3.2 KiB)

Same for python-apt 0.7.4ubuntu5 on hardy for x86

Building dependency tree...
Reading state information...
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  mcpp mesa-utils xf86dga beforelight libdmx1 ico xpmutils xgc bitmap
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  python-apt
Suggested packages:
  python-apt-dbg
The following packages will be upgraded:
  python-apt
1 upgraded, 0 newly installed, 0 to remove and 337 not upgraded.
279 not fully installed or removed.
Need to get 0B/194kB of archives.
After this operation, 8192B of additional disk space will be used.
(Reading database ... 88466 files and directories currently installed.)
Preparing to replace python-apt 0.7.3.1ubuntu4 (using .../python-apt_0.7.4ubuntu5_i386.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1593, in <module>
    main()
  File "/usr/bin/pycentral", line 1587, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1075, in run
    requested = pyversions.requested_versions_for_runtime(version_field, version_only=True)
  File "/usr/share/pycentral-data/pyversions.py", line 172, in requested_versions_for_runtime
    vinfo = parse_versions(vstring)
  File "/usr/share/pycentral-data/pyversions.py", line 58, in parse_versions
    raise ValueError, 'error parsing Python-Version attribute'
ValueError: error parsing Python-Version attribute
Error in sys.excepthook:
Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/apport_python_hook.py", line 38, in apport_excepthook
    from apport.fileutils import likely_packaged
  File "/var/lib/python-support/python2.5/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/var/lib/python-support/python2.5/apport/report.py", line 21, in <module>
    import fileutils
  File "/var/lib/python-support/python2.5/apport/fileutils.py", line 16, in <module>
    from packaging_impl import impl as packaging
  File "/var/lib/python-support/python2.5/apport/packaging_impl.py", line 18, in <module>
    import apt
  File "/usr/lib/python2.5/site-packages/apt/__init__.py", line 2, in <module>
    import apt_pkg
ImportError: libapt-pkg-libc6.6-6.so.4.5: cannot open shared object file: No such file or directory

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1593, in <module>
    main()
  File "/usr/bin/pycentral", line 1587, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1075, in run
    requested = pyversions.requested_versions_for_runtime(version_field, version_only=True)
  File "/usr/share/pycentral-data/pyversions.py", line 172, in requested_versions_for_runtime
    vinfo = parse_versions(vstring)
  File "/usr/share/pycentral-data/pyversions.py", line 58, in parse_versions
    raise ValueError, 'error parsing Python-Version attribute'
ValueError: error parsing Python-Version attribute
dpkg: error processing /var/cache/apt/archives/python-apt_0.7.4ubuntu5_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were enco...

Read more...

Revision history for this message
Mathieu Marquer (slasher-fun) wrote :

Workaround : After installing python2.4, here is the output :

Paramétrage de python-apt (0.7.4ubuntu5) ...
'import site' failed; use -v for traceback

Paramétrage de update-manager-core (1:0.87.8) ...
'import site' failed; use -v for traceback

So python-apt is now updated, but with a "'import site' failed; use -v for traceback" error.

Revision history for this message
Bruce Cowan (bruce89-deactivatedaccount) wrote :

I suspect this fixes this and other related issues:

python-central (0.5.50ubuntu5) hardy; urgency=low

  * do not crash if a package has private files

 -- Michael Vogt < <email address hidden>> Tue, 19 Feb 2008 14:41:55 +0100

Revision history for this message
Fabio Colombo (stratosphere1982) wrote :

Problem solved with the last updates..have to close this bug-report now or..? thanks
Fabio

Changed in python-apt:
status: New → Fix Released
Revision history for this message
PC_THE_GREAT (pcthegreat) wrote :

apparently this bug doesn't see m to have been fixed.

tried to update gutsy server to hardy,

log is below :

root@codevisare:/home/selven# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  python-apt
Suggested packages:
  python-apt-dbg
The following packages will be upgraded:
  python-apt
1 upgraded, 0 newly installed, 0 to remove and 143 not upgraded.
38 not fully installed or removed.
Need to get 0B/194kB of archives.
After this operation, 8192B of additional disk space will be used.
Do you want to continue [Y/n]? Y
(Reading database ... 22082 files and directories currently installed.)
Preparing to replace python-apt 0.7.3.1ubuntu4 (using .../python-apt_0.7.4ubuntu5_i386.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1593, in <module>
    main()
  File "/usr/bin/pycentral", line 1587, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1075, in run
    requested = pyversions.requested_versions_for_runtime(version_field, version_only=True)
  File "/usr/share/pycentral-data/pyversions.py", line 172, in requested_versions_for_runtime
    vinfo = parse_versions(vstring)
  File "/usr/share/pycentral-data/pyversions.py", line 58, in parse_versions
    raise ValueError, 'error parsing Python-Version attribute'
ValueError: error parsing Python-Version attribute
dpkg: error processing /var/cache/apt/archives/python-apt_0.7.4ubuntu5_i386.deb (--unpack):
 subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/python-apt_0.7.4ubuntu5_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@codevisare:/home/selven# apt-get dist-upgrade
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:
  python-apt: Depends: libapt-inst-libc6.6-6-1.1 but it is not installable
              Depends: libapt-pkg-libc6.6-6-4.5 but it is not installable
E: Unmet dependencies. Try using -f.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.