这是 apt update / apt Upgrade / apt dist-upgrade 的结果sudo apt dist-upgradeReading package lists... DoneBuilding dependency tree Reading state information... DoneCalculating upgrade... DoneThe following packages will be upgraded: python-cryptography1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.24 not fully installed or removed.Need to get 0 B/212 kB of archives.After this operation, 0 B of additional disk space will be used.Do you want to continue? [Y/n] yReading changelogs... Done(Reading database ... 81174 files and directories currently installed.)Preparing to unpack .../python-cryptography_1.7.1-3+deb9u2_amd64.deb ... File "/usr/bin/pyclean", line 63 except (IOError, OSError), e: ^SyntaxError: invalid syntaxdpkg: warning: subprocess old pre-removal script returned error exit status 1dpkg: trying script from the new package instead ... File "/usr/bin/pyclean", line 63 except (IOError, OSError), e: ^SyntaxError: invalid syntaxdpkg: error processing archive /var/cache/apt/archives/python-cryptography_1.7.1-3+deb9u2_amd64.deb (--unpack): subprocess new pre-removal script returned error exit status 1Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in <module> from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in <module> from ConfigParser import SafeConfigParserImportError: No module named 'ConfigParser'dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 1Errors were encountered while processing: /var/cache/apt/archives/python-cryptography_1.7.1-3+deb9u2_amd64.debE: Sub-process /usr/bin/dpkg returned an error code (1)我不太确定我在这里到底做了什么,但我无法摆脱它。我似乎无法删除该软件包,或修复它,或重新安装它,一切都会因该错误或类似错误而失败。有人可以帮我摆脱这个该死的东西吗?我已经尝试了几天了。谢谢!!!
2 回答
慕容森
TA贡献1853条经验 获得超18个赞
谢谢汤姆,虽然这不完全是我的问题,但它确实引导我走上了正确的道路。基本上,这整个问题是因为我在某个时候将 Python 3.5 设置为默认值而引起的,显然 Debian 出于某种原因无法找到处理该问题的方法。当我恢复到2.7后,一切都很好。
MM们
TA贡献1886条经验 获得超2个赞
我今天也遇到了这个问题,python-cryptography 以类似的方式阻止了我。
我在 python-cryptography 包上手动运行 pyclean 。我是 root,所以你可能需要在命令前面加上 sudo
/usr/bin/pyclean python-cryptography
这让我遇到了一组不同的错误(很可能与您的问题无关。我的系统非常损坏),但 dpkg 很高兴再次开始工作。试一试
-汤姆
添加回答
举报
0/150
提交
取消