Open neilconway opened 9 years ago
+1
A partner is running into this issue.
I encountered this same issue:
sudo apt install python2.7 wget
[sudo] password for stackadmin:
Reading package lists... Done
Building dependency tree
Reading state information... Done
wget is already the newest version (1.17.1-1ubuntu1.1).
The following additional packages will be installed:
libpython2.7-minimal libpython2.7-stdlib python2.7-minimal
Suggested packages:
python2.7-doc binutils binfmt-support
The following NEW packages will be installed:
libpython2.7-minimal libpython2.7-stdlib python2.7 python2.7-minimal
0 upgraded, 4 newly installed, 0 to remove and 12 not upgraded.
Need to get 3,743 kB of archives.
After this operation, 15.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-minimal amd64 2.7.12-1ubuntu0~16.04.1 [339 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-minimal amd64 2.7.12-1ubuntu0~16.04.1 [1,295 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-stdlib amd64 2.7.12-1ubuntu0~16.04.1 [1,884 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7 amd64 2.7.12-1ubuntu0~16.04.1 [224 kB]
Fetched 3,743 kB in 0s (4,519 kB/s)
Selecting previously unselected package libpython2.7-minimal:amd64.
(Reading database ... 103567 files and directories currently installed.)
Preparing to unpack .../libpython2.7-minimal_2.7.12-1ubuntu0~16.04.1_amd64.deb ...
Unpacking libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.1) ...
Selecting previously unselected package python2.7-minimal.
Preparing to unpack .../python2.7-minimal_2.7.12-1ubuntu0~16.04.1_amd64.deb ...
new installation of python2.7-minimal; /usr/lib/python2.7/site-packages is a directory
which is expected a symlink to /usr/local/lib/python2.7/dist-packages.
please find the package shipping files in /usr/lib/python2.7/site-packages and
file a bug report to ship these in /usr/lib/python2.7/dist-packages instead
aborting installation of python2.7-minimal
dpkg: error processing archive /var/cache/apt/archives/python2.7-minimal_2.7.12-1ubuntu0~16.04.1_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Selecting previously unselected package libpython2.7-stdlib:amd64.
Preparing to unpack .../libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.1_amd64.deb ...
Unpacking libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.1) ...
Selecting previously unselected package python2.7.
Preparing to unpack .../python2.7_2.7.12-1ubuntu0~16.04.1_amd64.deb ...
Unpacking python2.7 (2.7.12-1ubuntu0~16.04.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
/var/cache/apt/archives/python2.7-minimal_2.7.12-1ubuntu0~16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
This error is caused by mesos being installed into this location:
$ dpkg -S /usr/lib/python2.7/site-packages
mesos: /usr/lib/python2.7/site-packages
This was installed using the mesosphere deb packages
How can I undo the Python
installation? I tried purge
, autoremove
and apt-get -f install
without success.
Using this to fix apt-get system after fail:
apt -r python-minimal
apt -r python2.7
apt autoclean
Notice apt, NOT apt-get.
The Debian Python packaging policy says:
The package doesn't seem to do this:
This does cause problems in practice; for example, installing python2.7-minimal gripes about it: