[Bug 1750586] Re: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Thanks Stephen. As per your note I removed the /usr/share/python/rekall-forensic folder then it is worked for me 2 days I spend for finding out a solution thanks for your help... -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1750586 Title: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/1750586/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1750586] Re: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
I faced issues when upgrading Ubuntu 16.04 (I don't remember exactly, maybe from 16.04.3 to 16.04.4). At end of the upgrade it showed following error: Setting up python-minimal (2.7.12-1~16.04) ... Traceback (most recent call last): File "/usr/local/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/lib/python2.7/compileall.py", line 16, in import struct File "/usr/local/lib/python2.7/struct.py", line 1, in from _struct import * ImportError: No module named _struct dpkg: error processing package python-minimal (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: python-minimal E: Sub-process /usr/bin/dpkg returned an error code (1) It started showing Broken Package error in Ubuntu so I thought re-installing python would fix this issue, but it uninstalled python with all python packages and all softwares which depends on any python library, for example gimp, kicad, kde, oxygen-icon-theme, pycharm etc (list is very long). Now when ever I try to install python: sudo apt-get install python Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python-minimal python2.7 python2.7-minimal Suggested packages: python-doc python-tk python2.7-doc The following NEW packages will be installed: libpython-stdlib libpython2.7-minimal libpython2.7-stdlib python python-minimal python2.7 python2.7-minimal 0 upgraded, 7 newly installed, 0 to remove and 21 not upgraded. Need to get 1,628 kB/3,877 kB of archives. After this operation, 16.6 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-minimal amd64 2.7.12-1ubuntu0~16.04.3 [340 kB] Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-minimal amd64 2.7.12-1ubuntu0~16.04.3 [1,261 kB] Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-minimal amd64 2.7.12-1~16.04 [28.1 kB] Fetched 1,628 kB in 6s (248 kB/s) Selecting previously unselected package libpython2.7-minimal:amd64. (Reading database ... 250996 files and directories currently installed.) Preparing to unpack .../libpython2.7-minimal_2.7.12-1ubuntu0~16.04.3_amd64.deb ... Unpacking libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.3) ... Selecting previously unselected package python2.7-minimal. Preparing to unpack .../python2.7-minimal_2.7.12-1ubuntu0~16.04.3_amd64.deb ... Unpacking python2.7-minimal (2.7.12-1ubuntu0~16.04.3) ... Selecting previously unselected package python-minimal. Preparing to unpack .../python-minimal_2.7.12-1~16.04_amd64.deb ... Unpacking python-minimal (2.7.12-1~16.04) ... Selecting previously unselected package libpython2.7-stdlib:amd64. Preparing to unpack .../libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.3_amd64.deb ... Unpacking libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.3) ... Selecting previously unselected package python2.7. Preparing to unpack .../python2.7_2.7.12-1ubuntu0~16.04.3_amd64.deb ... Unpacking python2.7 (2.7.12-1ubuntu0~16.04.3) ... Selecting previously unselected package libpython-stdlib:amd64. Preparing to unpack .../libpython-stdlib_2.7.12-1~16.04_amd64.deb ... Unpacking libpython-stdlib:amd64 (2.7.12-1~16.04) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ... Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ... Processing triggers for mime-support (3.59ubuntu1) ... Setting up libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.3) ... Setting up python2.7-minimal (2.7.12-1ubuntu0~16.04.3) ... Linking and byte-compiling packages for runtime python2.7... Setting up python-minimal (2.7.12-1~16.04) ... Traceback (most recent call last): File "/usr/local/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/lib/python2.7/compileall.py", line 16, in import struct File "/usr/local/lib/python2.7/struct.py", line 1, in from _struct import * ImportError: No module named _struct dpkg: error processing package python-minimal (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: python-minimal E: Sub-process /usr/bin/dpkg returned an error code (1) Please help m
[Bug 1750586] Re: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
I have three packages under /usr/share/python, I think they are all company specific packages. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1750586 Title: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/1750586/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1750586] Re: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Thanks, Stephen. I had the same results as Mattias, mine was datapulley instead of rekall-forensic. Your direction of running the compile without the redirect so I could see the output was what got me there. FWIW, datapulley seemed to be the only package in that folder. Is yours the same? (Mattias, same question for you.) Considering how much... uh... stuff I have installed and how integral Python is to Ubuntu it would seem to me that there would be more; maybe some folks didn't take a hint that they should be doing a thing a certain way. Perhaps this is somewhat more systemic? I don't know enough about Python or its package management to even start diagnosing something like this. I'm filing with datapulley, which broke my apt. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1750586 Title: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/1750586/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1750586] Re: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Thank you Stephen, your solution worked for me too. A different package as you expected, but removing the folder seems to have resolved my issues. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1750586 Title: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/1750586/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1750586] Re: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
The post installation file /var/lib/dpkg/info/python-minimal.postinst runs the following command: python2.7 -m compileall /usr/share/python/ >/dev/null Running the command manually (without the /dev/null redirect) produces the following error for me: Compiling /usr/share/python/rekall-forensic/lib/python2.7/site-packages/pexpect/async.py ... File "/usr/share/python/rekall-forensic/lib/python2.7/site-packages/pexpect/async.py", line 16 transport, pw = yield from asyncio.get_event_loop()\ ^ SyntaxError: invalid syntax I removed the /usr/share/python/rekall-forensic folder and was able to "apt install -f". Likely a different package is causing you trouble, but try running that command for more information. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1750586 Title: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/1750586/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1750586] Re: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: python-defaults (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1750586 Title: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/1750586/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1750586] Re: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
** Tags removed: need-duplicate-check -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1750586 Title: package python-minimal 2.7.12-1~16.04 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/1750586/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs