path --- /usr/bin/pyvenv.cfg....................................................................................................................................................]
path --- /usr/pyvenv.cfg
path --- /usr/bin/pyvenv.cfg
path --- /usr/pyvenv.cfg
eval_wrong: ['path --- /usr/bin/pyvenv.cfg', 'path --- /usr/pyvenv.cfg', "b'o\\r\\r\\n'"]
Traceback (most recent call last):
File "/usr/bin/py3compile", line 319, in <module>
main()
File "/usr/bin/py3compile", line 290, in main
compile(files, compile_versions, options.force,
File "/usr/bin/py3compile", line 201, in compile
interpreter.magic_number(version), mtime)
File "/usr/share/python3/debpython/interpreter.py", line 235, in magic_number
return eval(result)
TypeError: eval() arg 1 must be a string, bytes or code object
dpkg: error processing package libglib2.0-dev-bin (--configure):
installed libglib2.0-dev-bin package post-installation script subprocess returned error exit status 1
Setting up python3-lockfile (1:0.12.2-2.2) ...
dpkg: error processing package python3-pexpect (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libglib2.0-dev-bin
python3-lockfile
python3-filelock
python3-requests-toolbelt
python3-pkginfo
python3-pylev
python3-virtualenv
python3-clikit
python3-virtualenv-clone
python3-distlib
python3-webencodings
python3-platformdirs
python3-jinja2
plymouth-theme-ubuntu-text
python3-packaging
libglib2.0-dev:amd64
python3-poetry
python3-poetry-core
python3-cryptography
python3-crashtest
python3-html5lib
speedtest-cli
python3-cachy
python3-pastel
python3-cleo
python3-msgpack
python3-cachecontrol
python3-shellingham
python3-tomlkit
python3-ptyprocess
pipenv
libpoppler-glib-dev
cloud-init
python3-pexpect
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
这通常是apt中的python环境有问题了
直接使用
sudo apt purge python3
sudo apt-get purge python3
注意这里使用apt purge 从系统中彻底删除软件包及其所有配置文件。
apt remove不会删除配置文件
进行
apt-get update
apt-get upgrade
发现成功解决bug