package python3 3.2.3-2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 4

Bug #1024016 reported by col reilly
284
This bug affects 60 people
Affects Status Importance Assigned to Milestone
python3-defaults (Ubuntu)
Fix Released
Critical
Scott Kitterman
screen-resolution-extra (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

updating packages via the gui...crash happened. details were as follows...

dpkg: dependency problems prevent configuration of nvidia-common:
 nvidia-common depends on ubuntu-drivers-common; however:
  Package ubuntu-drivers-common is not configured yet.

dpkg: error processing nvidia-common (--configure):
 dependency problems - leaving unconfigured
Setting up usb-creator-common (0.2.40) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up usb-creator-gtk (0.2.40) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 python3
 ubuntu-drivers-common
 nvidia-common
Error in function:
Setting up python3 (3.2.3-2) ...
running python rtupdate hooks for python3.2...
Usage: py3clean [-V VERSION] [-p PACKAGE | DIR_OR_FILE]

py3clean: error: only one action is allowed at the same time (cleaning directory or a package)
error running python rtupdate hook ubuntu-drivers-common
dpkg: error processing python3 (--configure):
 subprocess installed post-installation script returned error exit status 4
dpkg: dependency problems prevent configuration of ubuntu-drivers-common:
 ubuntu-drivers-common depends on python3 (>= 3.2); however:
  Package python3 is not configured yet.

dpkg: error processing ubuntu-drivers-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-common:
 nvidia-common depends on ubuntu-drivers-common; however:
  Package ubuntu-drivers-common is not configured yet.

dpkg: error processing nvidia-common (--configure):
 dependency problems - leaving unconfigured

ProblemType: Package
DistroRelease: Ubuntu 12.10
Package: python3 3.2.3-2
ProcVersionSignature: Ubuntu 3.5.0-4.4-generic 3.5.0-rc6
Uname: Linux 3.5.0-4-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.3-0ubuntu4
Architecture: amd64
Date: Thu Jul 12 19:44:28 2012
ErrorMessage: subprocess installed post-installation script returned error exit status 4
InstallationMedia: Xubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120620)
PackageArchitecture: all
SourcePackage: python3-defaults
Title: package python3 3.2.3-2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 4
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
col reilly (lupinehorror) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python3-defaults (Ubuntu):
status: New → Confirmed
Revision history for this message
Scott Kitterman (kitterman) wrote :

running python rtupdate hooks for python3.2...
Usage: py3clean [-V VERSION] [-p PACKAGE | DIR_OR_FILE]

py3clean: error: only one action is allowed at the same time (cleaning directory or a package)
error running python rtupdate hook ubuntu-drivers-common

affects: python3-defaults (Ubuntu) → ubuntu-drivers-common (Ubuntu)
Revision history for this message
col reilly (lupinehorror) wrote :

apt-get upgrade now reports multiple errors...

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 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 python3 (3.2.3-2) ...
running python rtupdate hooks for python3.2...
Usage: py3clean [-V VERSION] [-p PACKAGE | DIR_OR_FILE]

py3clean: error: only one action is allowed at the same time (cleaning directory or a package)
error running python rtupdate hook screen-resolution-extra
Usage: py3clean [-V VERSION] [-p PACKAGE | DIR_OR_FILE]

py3clean: error: only one action is allowed at the same time (cleaning directory or a package)
error running python rtupdate hook ubuntu-drivers-common
dpkg: error processing python3 (--configure):
 subprocess installed post-installation script returned error exit status 4
dpkg: dependency problems prevent configuration of ubuntu-drivers-common:
 ubuntu-drivers-common depends on python3 (>= 3.2); however:
  Package python3 is not configured yet.

dpkg: error processing ubuntu-drivers-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-common:
 nvidia-common depends on ubuntu-drivers-common; however:
  Package ubuntu-drivers-common is not configured yet.

dpkg: error processing nvidia-common (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                            No apport report written because the error message indicates it's a follow-up error from a previous failure.
                                                        Errors were encountered while processing:
 python3
 ubuntu-drivers-common
 nvidia-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Edward Donovan (edward.donovan) wrote :

The file "/usr/share/python3/runtime.d/ubuntu-drivers-common.rtupdate" calls py3clean with a '-p' package argument, and a directory argument. This breaks py3clean, which expects one or the other, as seen above.

Line 4 of this short file is:

  py3clean -p ubuntu-drivers-common /usr/share/ubuntu-drivers-common

Removing either of those arguments fixes the problem; "-p ubuntu-drivers-common", or "/usr/share/ubuntu-drivers-common". I don't know which might be more proper to use. Both ways worked on my system. So we want either:

  py3clean /usr/share/ubuntu-drivers-common

Or

  py3clean -p ubuntu-drivers-common

(The other command, the 'py3compile' line, does not seem to have a problem with multiple arguments.)

Thanks.

Revision history for this message
col reilly (lupinehorror) wrote :

neither worked for me i'm afraid.

Revision history for this message
Edward Donovan (edward.donovan) wrote :

Ugh, that's too bad...I'll try to think about it, then. Thanks.

Revision history for this message
Lito (lito-eordes) wrote :

Edit:

sudo vi /usr/share/python3/runtime.d/*

And remove all "-p package-name" leaving only the /usr/share/package-name

After edit this files:

apt-get update && apt-get dist-upgrade

It worked for me

Revision history for this message
Lito (lito-eordes) wrote :

Changed files:

/usr/share/python3/runtime.d/screen-resolution-extra.rtupdate

# py3clean -p screen-resolution-extra /usr/share/screen-resolution-extra
        py3clean /usr/share/screen-resolution-extra

/usr/share/python3/runtime.d/ubuntu-drivers-common.rtupdate

# py3clean -p ubuntu-drivers-common /usr/share/ubuntu-drivers-common
        py3clean /usr/share/ubuntu-drivers-common

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in screen-resolution-extra (Ubuntu):
status: New → Confirmed
Revision history for this message
Tony C. (tonyc-atl-ga) wrote :

I got this
illegal package name in specifier '/usr/share/ubuntu-drivers-co': must start with an alphanumeric character

So I changed files:
# /usr/share/python3/runtime.d/checkbox.rtupdate
# py3clean /usr/share/checkbox
    py3clean checkbox

# /usr/share/python3/runtime.d/screen-resolution-extra.rtupdate
# py3clean -p screen-resolution-extra /usr/share/screen-resolution-extra
   py3clean screen-resolution-extra

# /usr/share/python3/runtime.d/ubuntu-drivers-common.rtupdate
# py3clean -p ubuntu-drivers-common /usr/share/ubuntu-drivers-common
    py3clean ubuntu-drivers-common

Then ran
apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... 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.
Setting up python3 (3.2.3-2ubuntu1) ...
running python rtupdate hooks for python3.2...
running python post-rtupdate hooks for python3.2...

Everything is working correctly no

Revision history for this message
Tony C. (tonyc-atl-ga) wrote :

That last line of my last post should read
Everything is working correctly now.

Revision history for this message
Edward Donovan (edward.donovan) wrote :

The changelog for python3-defaults 3.2.3-2ubuntu1 claimed to fix this, via duplicate bug 1024059. That package doesn't appear to fix this, though, as far as I can test. Thanks.

Revision history for this message
Razor_alpha (razoralpha) wrote :

It didn't fixed this - I suffered from the same issues until 3 minutes ago with python 3.2.3-2 - comment (#11) is accurate, it solves the problem.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Turns out is wasn't all fixed. I think this will be enough:

python3-defaults (3.2.3-3) unstable; urgency=high

  * Yet another update in SHEBANG_RE to handle even more cases
  * test4 fixed to catch missing /usr/bin/python → /usr/bin/python3 rewrites
  * py3clean: accept --package and directory name at the same time
    (change missed in -1 upload, closes: #681389)
  * Bump minimum required python3 version to 3.2.3-3~ in packages with .py files
    (due to --package option that is added to py3compile/py3clean in rtupdate
    scripts)

Just uploaded.

affects: ubuntu-drivers-common (Ubuntu) → python3-defaults (Ubuntu)
Changed in python3-defaults (Ubuntu):
status: Confirmed → Fix Released
Changed in screen-resolution-extra (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Scott Kitterman (kitterman) wrote :

Edward: Thanks for all the bug triaging. It's a big help.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Actually the fix is incomplete. Stand by for another upload.

Changed in python3-defaults (Ubuntu):
status: Fix Released → In Progress
assignee: nobody → Scott Kitterman (kitterman)
importance: Undecided → Critical
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3-defaults - 3.2.3-3ubuntu1

---------------
python3-defaults (3.2.3-3ubuntu1) quantal; urgency=high

  [ Piotr Ożarowski ]
  * py3clean: really close #681389 (LP: #1024016)
 -- Scott Kitterman <email address hidden> Fri, 13 Jul 2012 00:57:43 -0400

Changed in python3-defaults (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Tamer Saadeh (tamersaadeh) wrote :

I'm getting the following because I have python-minimal (requires 3.2.3-2ubuntu1) installed:

dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3-minimal (= 3.2.3-2ubuntu1); however:
  Version of python3-minimal on system is 3.2.3-3.

dpkg: error processing python3 (--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 python3-all:
 python3-all depends on python3 (= 3.2.3-2ubuntu1); however:
  Package python3 is not configured yet.

dpkg: error processing python3-all (--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:
 python3
 python3-all
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Scott Kitterman (kitterman) wrote :

This should be fixed with the next upload. It will start to hit archive.ubuntu.com in about 15 minutes and then be mirrored to the local mirrors from there.

Revision history for this message
Elfy (elfy) wrote :

Still getting the same thing here. Server is archive.ubutnu.com

dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3-minimal (= 3.2.3-2ubuntu1); however:
  Version of python3-minimal on system is 3.2.3-3ubuntu1.

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 1024016] Re: package python3 3.2.3-2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 4

Run apt-get update again. It looks like you've got a mix of versions. This is all fixed in 3.2.3-3ubuntu1.

Revision history for this message
Karma Dorje (taaroa) wrote :

# LANG=en 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:
  python3
Suggested packages:
  python3-doc python3-tk
The following packages will be upgraded:
  python3
1 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
3 not fully installed or removed.
Need to get 0 B/33.0 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "ru:en",
        LC_ALL = (unset),
        LC_TIME = "ru_RU.UTF-8",
        LC_MONETARY = "ru_RU.UTF-8",
        LC_ADDRESS = "ru_RU.UTF-8",
        LC_TELEPHONE = "ru_RU.UTF-8",
        LC_NAME = "ru_RU.UTF-8",
        LC_MEASUREMENT = "ru_RU.UTF-8",
        LC_IDENTIFICATION = "ru_RU.UTF-8",
        LC_NUMERIC = "ru_RU.UTF-8",
        LC_PAPER = "ru_RU.UTF-8",
        LANG = "en"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3-minimal (= 3.2.3-3); however:
  Version of python3-minimal on system is 3.2.3-3ubuntu1.

dpkg: error processing python3 (--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 ubuntu-drivers-common:
 ubuntu-drivers-common depends on python3 (>= 3.2); however:
  Package python3 is not configured yet.

dpkg: error processing ubuntu-drivers-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-common:
 nvidia-common depends on ubuntu-drivers-common; however:
  Package ubuntu-drivers-common is not configured yet.

dpkg: error processing nvidia-common (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                    Errors were encountered while processing:
 python3
 ubuntu-drivers-common
 nvidia-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

# LANG=en apt-cache policy python3
python3:
  Installed: 3.2.3-3
  Candidate: 3.2.3-3ubuntu1
  Version table:
     3.2.3-3ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
 *** 3.2.3-3 0
        100 /var/lib/dpkg/status

Revision history for this message
Elfy (elfy) wrote :

I have.

Still nothing.

Revision history for this message
Elfy (elfy) wrote :

Updated again -

apt-cache policy python3
python3:
  Installed: 3.2.3-3
  Candidate: 3.2.3-3ubuntu1
  Version table:
     3.2.3-3ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/main i386 Packages
 *** 3.2.3-3 0
        100 /var/lib/dpkg/status

apt-cache policy python3-minimal
python3-minimal:
  Installed: 3.2.3-3ubuntu1
  Candidate: 3.2.3-3ubuntu1
  Version table:
 *** 3.2.3-3ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/main i386 Packages
        100 /var/lib/dpkg/status

dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3-minimal (= 3.2.3-3); however:
  Version of python3-minimal on system is 3.2.3-3ubuntu1.

Revision history for this message
Karma Dorje (taaroa) wrote :

# export TZ="UTC";LANG=en date
Fri Jul 13 08:24:09 UTC 2012

# LANG=C apt-get --reinstall install python3-minimal python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  python3-doc python3-tk
The following packages will be upgraded:
  python3
1 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 13 not upgraded.
3 not fully installed or removed.
Need to get 0 B/46,5 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 172775 files and directories currently installed.)
Preparing to replace python3-minimal 3.2.3-3ubuntu1 (using .../python3-minimal_3.2.3-3ubuntu1_all.deb) ...
Unpacking replacement python3-minimal ...
Processing triggers for man-db ...
Setting up python3-minimal (3.2.3-3ubuntu1) ...
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3-minimal (= 3.2.3-3); however:
  Version of python3-minimal on system is 3.2.3-3ubuntu1.

dpkg: error processing python3 (--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 ubuntu-drivers-common:
 ubuntu-drivers-common depends on python3 (>= 3.2); however:
  Package python3 is not configured yet.

dpkg: error processing ubuntu-drivers-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-common:
 nvidia-common depends on ubuntu-drivers-common; however:
  Package ubuntu-drivers-common is not configured yet.

dpkg: error processing nvidia-common (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                    Errors were encountered while processing:
 python3
 ubuntu-drivers-common
 nvidia-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Sascha (skbierm-deactivatedaccount) wrote :

python3-examples hängt ab von python3 (= 3.2.3-2ubuntu1); aber:Es wurde kein Apport-Bericht verfasst, da das Limit MaxReports bereits erreicht ist.

.... means, that at the moment python3-examples on my side is still blocking the update.

Revision history for this message
actionparsnip (andrew-woodhead666) wrote :

Ran a clean set of updates today and python3 installed ok.

Revision history for this message
actionparsnip (andrew-woodhead666) wrote :

Ok tell a lie, just reran, same issue.

Revision history for this message
Sascha (skbierm-deactivatedaccount) wrote :

The time for waiting that some switches the package dependencies from = to >= took me to long.
For anyone else whose in need of a quick fix, the old way still works ...
sudo dpkg -i /var/cache/apt/archive/python3_3.2.3-3ubuntu1_all.deb && sudo apt-get dist-upgrade
 ... this ends the python3/python3-minimal trouble for the moment.

Revision history for this message
Karma Dorje (taaroa) wrote :

sudo dpkg -i /var/cache/apt/archives/python3_3.2.3-3ubuntu1_all.deb && sudo apt-get dist-upgrade

ok. resolved worksforme.

Revision history for this message
Elfy (elfy) wrote :

Had to do similar - had to get mine from an out of date archive though.

Revision history for this message
Tamer Saadeh (tamersaadeh) wrote :

I was still facing the problem in #19 as of 14:00 UTC so I manually downloaded the python packages (python3-minimal, python3, and python3-all), as suggested by https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/1024272 and it fixes the problem.

Revision history for this message
actionparsnip (andrew-woodhead666) wrote :

#31 definitely fixes it here. Promise :)

Revision history for this message
col reilly (lupinehorror) wrote :

yup #31 seems to have done it for me too. thanks for that.

Revision history for this message
Piotr Tarsa (piotr-tarsa) wrote :

#31 worked for me also, with upped python version as now there's a higher version in repository

Revision history for this message
marco cammarata (marcocamma) wrote :

on ubuntu quantal

cd /tmp
sudo apt-get download python3
sudo dpkg -i ptyhon3*.deb && apt-get dist-upgrade

seems to have fixed the problem

Yuriy Syrovetskiy (cblp)
no longer affects: dh-python (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers