I have an Ubuntu 18.04.2 LTS (upgraded from Ubuntu 16.04, 6 months ago).
Last week, I ran sudo apt upgrade
and encountered the following error due to libpython3.7:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
chromium-browser-l10n : Depends: chromium-browser (>= 75.0.3770.90-0ubuntu0.18.04.1) but 74.0.3729.169-0ubuntu0.18.04.1 is installed
lib32gcc1 : Depends: gcc-8-base (= 8.3.0-6ubuntu1~18.04) but 8.3.0-6ubuntu1~18.04.1 is installed
lib32stdc++6 : Depends: gcc-8-base (= 8.3.0-6ubuntu1~18.04) but 8.3.0-6ubuntu1~18.04.1 is installed
libatomic1 : Depends: gcc-8-base (= 8.3.0-6ubuntu1~18.04) but 8.3.0-6ubuntu1~18.04.1 is installed
libcc1-0 : Depends: gcc-8-base (= 8.3.0-6ubuntu1~18.04) but 8.3.0-6ubuntu1~18.04.1 is installed
libgomp1 : Depends: gcc-8-base (= 8.3.0-6ubuntu1~18.04) but 8.3.0-6ubuntu1~18.04.1 is installed
libitm1 : Depends: gcc-8-base (= 8.3.0-6ubuntu1~18.04) but 8.3.0-6ubuntu1~18.04.1 is installed
liblsan0 : Depends: gcc-8-base (= 8.3.0-6ubuntu1~18.04) but 8.3.0-6ubuntu1~18.04.1 is installed
libmpx2 : Depends: gcc-8-base (= 8.3.0-6ubuntu1~18.04) but 8.3.0-6ubuntu1~18.04.1 is installed
libobjc4 : Depends: gcc-8-base (= 8.3.0-6ubuntu1~18.04) but 8.3.0-6ubuntu1~18.04.1 is installed
libpython3.7 : Depends: libpython3.7-stdlib (= 3.7.3-2~18.04.1) but 3.7.2-1+xenial1 is installed
libpython3.7-dev : Depends: libpython3.7-stdlib (= 3.7.3-2~18.04.1) but 3.7.2-1+xenial1 is installed
libpython3.7-stdlib : Depends: libpython3.7-minimal (= 3.7.2-1+xenial1) but 3.7.3-2~18.04.1 is installed
python3.7 : Depends: libpython3.7-stdlib (= 3.7.3-2~18.04.1) but 3.7.2-1+xenial1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
I tried some commands found on stackexchange for a similar problem: sudo apt --fix-broken install
, sudo dpkg --configure -a
, sudo apt-get clean && sudo apt-get update && sudo apt-get upgrade -f
, but nothing works:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libudev1:i386 python3.7-distutils python3.7-lib2to3
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
chromium-browser chromium-codecs-ffmpeg-extra lib32gcc1 lib32stdc++6 libatomic1 libcc1-0 libgomp1 libitm1 liblsan0 libmpx2 libobjc4 libpython3.7-stdlib libquadmath0 libstdc++6 libstdc++6:i386 libtsan0
Suggested packages:
webaccounts-chromium-extension unity-chromium-extension adobe-flashplugin
The following packages will be upgraded:
chromium-browser chromium-codecs-ffmpeg-extra lib32gcc1 lib32stdc++6 libatomic1 libcc1-0 libgomp1 libitm1 liblsan0 libmpx2 libobjc4 libpython3.7-stdlib libquadmath0 libstdc++6 libstdc++6:i386 libtsan0
16 upgraded, 0 newly installed, 0 to remove and 62 not upgraded.
10 not fully installed or removed.
Need to get 0 B/66.5 MB of archives.
After this operation, 5549 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 425254 files and directories currently installed.)
Preparing to unpack .../libquadmath0_8.3.0-6ubuntu1~18.04.1_amd64.deb ...
[...]
Preparing to unpack .../10-libpython3.7-stdlib_3.7.3-2~18.04.1_amd64.deb ...
Unpacking libpython3.7-stdlib:amd64 (3.7.3-2~18.04.1) over (3.7.2-1+xenial1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-Wusvo1/10-libpython3.7-stdlib_3.7.3-2~18.04.1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3.7/distutils/__init__.py', which is also in package python3.7-distutils 3.7.2-1+xenial1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/tmp/apt-dpkg-install-Wusvo1/10-libpython3.7-stdlib_3.7.3-2~18.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Preparing to unpack .../libpython3.7-stdlib_3.7.3-2~18.04.1_amd64.deb ...
Unpacking libpython3.7-stdlib:amd64 (3.7.3-2~18.04.1) over (3.7.2-1+xenial1) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.7-stdlib_3.7.3-2~18.04.1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3.7/distutils/__init__.py', which is also in package python3.7-distutils 3.7.2-1+xenial1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../libnss-systemd_237-3ubuntu10.23_amd64.deb ...
Unpacking libnss-systemd:amd64 (237-3ubuntu10.23) over (237-3ubuntu10.22) ...
Preparing to unpack .../libsystemd0_237-3ubuntu10.23_amd64.deb ...
Unpacking libsystemd0:amd64 (237-3ubuntu10.23) over (237-3ubuntu10.22) ...
Errors were encountered while processing:
/var/cache/apt/archives/libpython3.7-stdlib_3.7.3-2~18.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I can no longer install packages
grep -P -r '^[ \t]*[^#[ \t]+' /etc/apt/sources.list /etc/apt/sources.list.d/
– nobody Jun 25 '19 at 08:01