Hi,
I have one RPI2 that had release VERSION_ID=“2017.10-1”.
I wanted to upgrade it from the command line with apt-get upgrade; apt-get distro-upgrade
During process, at one point I got the following error:
Setting up python3.5-minimal (3.5.3-1) …
Traceback (most recent call last):
File “/usr/lib/python3.5/py_compile.py”, line 6, in
import importlib._bootstrap_external
File “/usr/lib/python3.5/importlib/init.py”, line 57, in
import types
File “/usr/lib/python3.5/types.py”, line 166, in
import functools as _functools
File “/usr/lib/python3.5/functools.py”, line 23, in
from weakref import WeakKeyDictionary
File “/usr/lib/python3.5/weakref.py”, line 12, in
from _weakref import (
ImportError: cannot import name ‘_remove_dead_weakref’
dpkg: error processing package python3.5-minimal (–configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
python3-minimal depends on python3.5-minimal (>= 3.5.3-1~); however:
Package python3.5-minimal is not configured yet.
dpkg: error processing package python3-minimal (–configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.24-11+deb9u1) …
Errors were encountered while processing:
python3.5-minimal
python3-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried:
osmc@osmc:~$ sudo apt-get auto-remove
E: Invalid operation auto-remove
osmc@osmc:~$ sudo apt-get autoremove
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:
python3 : Depends: python3-minimal (= 3.4.2-2) but 3.5.3-1 is installed
python3-dev : Depends: python3 (= 3.5.3-1) but 3.4.2-2 is installed
Depends: libpython3-dev (= 3.5.3-1) but 3.4.2-2 is installed
Depends: python3.5-dev (>= 3.5.3-1~) but it is not installed
python3-greenlet : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-matplotlib : Depends: python-matplotlib-data (>= 2.0.0+dfsg1-2) but 1.4.2-3.1 is installed
Depends: python3-six (>= 1.10) but 1.8.0-1 is installed
Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
Depends: python3-cycler (>= 0.10.0) but it is not installed
Depends: libpng16-16 (>= 1.6.2-1) but it is not installed
Depends: libstdc++6 (>= 5.2) but 4.9.2-10 is installed
python3-numpy : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-tk : Depends: python3 (>= 3.5) but 3.4.2-2 is installed
E: Unmet dependencies. Try using -f.
and
osmc@osmc:~$ sudo apt-get -f install
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:
libavcodec56 libavdevice55 libavformat56 libavresample2 libavutil54 libdirectfb-1.2-9 libglu1-mesa libopenjpeg5 liborc-0.4-0 libperl4-corelibs-perl libschroedinger-1.0-0 libsdl1.2debian
libswscale3 libtimedate-perl libvpx1 libx264-142 python-greenlet
Use ‘apt-get autoremove’ to remove them.
The following extra packages will be installed:
ffmpeg libass5 libav-tools libavc1394-0 libavcodec57 libavdevice57 libavfilter6 libavformat57 libavresample3 libavutil55 libbluray1 libbs2b0 libchromaprint1 libdrm2 libebur128-1
libegl1-mesa libfftw3-double3 libflite1 libgbm1 libgme0 libiec61883-0 libjack-jackd2-0 libmpg123-0 libopenal-data libopenal1 libopencv-core2.4v5 libopencv-imgproc2.4v5 libopenjp2-7
libopenmpt0 libpgm-5.2-0 libpng16-16 libpostproc54 libpython3-dev libpython3-stdlib libpython3.5 libpython3.5-dev librubberband2 libsdl2-2.0-0 libshine3 libsnappy1v5 libsndio6.1 libsodium18
libsoxr0 libssh-gcrypt-4 libstdc++6 libswresample2 libswscale4 libtwolame0 libva-drm1 libva-x11-1 libva1 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx4 libwavpack1 libwayland-client0
libwayland-cursor0 libwayland-egl1-mesa libwayland-server0 libwebp6 libwebpmux2 libx264-148 libx265-95 libxcb-shape0 libxcb-shm0 libxcb-xfixes0 libxcb1 libxcursor1 libxinerama1
libxkbcommon0 libxrandr2 libxv1 libzmq5 libzvbi-common libzvbi0 python-matplotlib-data python3 python3-cycler python3-six python3.5-dev ttf-bitstream-vera xkb-data
Suggested packages:
ffmpeg-doc libbluray-bdj libfftw3-bin libfftw3-dev alsa-base jackd2 libportaudio2 sndiod python3-doc python3-venv python-cycler-doc
Recommended packages:
libaacs0 va-driver-all va-driver
The following packages will be REMOVED:
libavfilter5 libopencv-core2.4 libopencv-imgproc2.4
The following NEW packages will be installed:
ffmpeg libass5 libavc1394-0 libavcodec57 libavdevice57 libavfilter6 libavformat57 libavresample3 libavutil55 libbluray1 libbs2b0 libchromaprint1 libebur128-1 libegl1-mesa libfftw3-double3
libflite1 libgbm1 libgme0 libiec61883-0 libmpg123-0 libopenal-data libopenal1 libopencv-core2.4v5 libopencv-imgproc2.4v5 libopenjp2-7 libopenmpt0 libpgm-5.2-0 libpng16-16 libpostproc54
libpython3.5 libpython3.5-dev librubberband2 libsdl2-2.0-0 libshine3 libsnappy1v5 libsndio6.1 libsodium18 libsoxr0 libssh-gcrypt-4 libswresample2 libswscale4 libtwolame0 libva-drm1
libva-x11-1 libvorbisfile3 libvpx4 libwavpack1 libwayland-client0 libwayland-cursor0 libwayland-egl1-mesa libwayland-server0 libwebp6 libwebpmux2 libx264-148 libx265-95 libxcb-shape0
libxcb-shm0 libxcb-xfixes0 libxcursor1 libxinerama1 libxkbcommon0 libxrandr2 libxv1 libzmq5 libzvbi-common libzvbi0 python3-cycler python3.5-dev ttf-bitstream-vera xkb-data
The following packages will be upgraded:
libav-tools libdrm2 libjack-jackd2-0 libpython3-dev libpython3-stdlib libstdc++6 libva1 libvorbis0a libvorbisenc2 libxcb1 python-matplotlib-data python3 python3-six
13 upgraded, 70 newly installed, 3 to remove and 301 not upgraded.
83 not fully installed or removed.
Need to get 0 B/73,2 MB of archives.
After this operation, 110 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Extracting templates from packages: 100%
Setting up python3.5-minimal (3.5.3-1) …
Traceback (most recent call last):
File “/usr/lib/python3.5/py_compile.py”, line 6, in
import importlib._bootstrap_external
File “/usr/lib/python3.5/importlib/init.py”, line 57, in
import types
File “/usr/lib/python3.5/types.py”, line 166, in
import functools as _functools
File “/usr/lib/python3.5/functools.py”, line 23, in
from weakref import WeakKeyDictionary
File “/usr/lib/python3.5/weakref.py”, line 12, in
from _weakref import (
ImportError: cannot import name ‘_remove_dead_weakref’
dpkg: error processing package python3.5-minimal (–configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
python3-minimal depends on python3.5-minimal (>= 3.5.3-1~); however:
Package python3.5-minimal is not configured yet.
dpkg: error processing package python3-minimal (–configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python3.5-minimal
python3-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)
But with no success. How to finish the installation?
Regards