В очередной раз после ребута заглючила Малина. На этот раз что-то с Питоном, который нужен для моих задач.
Что ни пробовал, получаю одну и ту же хрень:
root@pi:/# apt purge python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libmpdec2 libpython3-stdlib libpython3.7-minimal libpython3.7-stdlib python-pip-whl python3-minimal python3.7 python3.7-minimal
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
dh-python* python3* python3-distutils* python3-lib2to3* python3-pip* python3-pkg-resources* python3-setuptools*
0 upgraded, 0 newly installed, 7 to remove and 37 not upgraded.
9 not fully installed or removed.
After this operation, 4,346 kB disk space will be freed.
Do you want to continue? [Y/n] y
Segmentation fault
(Reading database ... 30574 files and directories currently installed.)
Removing dh-python (3.20190308) ...
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x76f64ad0 (most recent call first):
Aborted
dpkg: error processing package dh-python (--remove):
installed dh-python package pre-removal script subprocess returned error exit status 134
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x76f6aad0 (most recent call first):
Aborted
dpkg: error while cleaning up:
installed dh-python package post-installation script subprocess returned error exit status 134
Removing python3-pip (18.1-5+rpt1) ...
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x76fcaad0 (most recent call first):
Aborted
dpkg: error processing package python3-pip (--remove):
installed python3-pip package pre-removal script subprocess returned error exit status 134
Removing python3-setuptools (40.8.0-1) ...
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x76fdfad0 (most recent call first):
Aborted
dpkg: error processing package python3-setuptools (--remove):
installed python3-setuptools package pre-removal script subprocess returned error exit status 134
dpkg: python3-distutils: dependency problems, but removing anyway as you requested:
python3-setuptools depends on python3-distutils; however:
Package python3-distutils is to be removed.
python3-pip depends on python3-distutils.
dh-python depends on python3-distutils | python3 (<< 3.6.5~rc1-1); however:
Package python3-distutils is to be removed.
Version of python3 on system is 3.7.3-1.
Removing python3-distutils (3.7.3-1) ...
Removing python3-lib2to3 (3.7.3-1) ...
dpkg: python3-pkg-resources: dependency problems, but removing anyway as you requested:
python3-setuptools depends on python3-pkg-resources (= 40.8.0-1).
Removing python3-pkg-resources (40.8.0-1) ...
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x76f03ad0 (most recent call first):
Aborted
dpkg: error processing package python3-pkg-resources (--remove):
installed python3-pkg-resources package pre-removal script subprocess returned error exit status 134
dpkg: python3: dependency problems, but removing anyway as you requested:
python3-setuptools depends on python3:any; however:
Package python3 is to be removed.
python3-pkg-resources depends on python3:any.
python3-pip depends on python3:any; however:
Package python3 is to be removed.
dh-python depends on python3:any.
dh-python depends on python3-distutils | python3 (<< 3.6.5~rc1-1); however:
Package python3-distutils is not installed.
Package python3 is to be removed.
dh-python depends on python3:any.
dh-python depends on python3-distutils | python3 (<< 3.6.5~rc1-1); however:
Package python3-distutils is not installed.
Package python3 is to be removed.
Removing python3 (3.7.3-1) ...
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x76f92ad0 (most recent call first):
Aborted
dpkg: error processing package python3 (--remove):
installed python3 package pre-removal script subprocess returned error exit status 134
Errors were encountered while processing:
dh-python
python3-pip
python3-setuptools
python3-pkg-resources
python3
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@pi:/#
Да насрать мне что у меня с Питоном. Я просто хочу его удалить используя стандартный пакетный менеджер операционной системы. Вызывать питон чтобы удалить питон могут додуматься только дебилыановцы
Пост - не о том, что мне делать. Разбираться влом, завтра просто накачу образ с нуля. Пост - удивление тому, что Дебиан до сих пор болеет детскими болезнями класса «не могу удалить глючную программу потому что она глючит».