首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我在Debian系统上做了一些事情,不允许我安装或删除任何东西。

我在Debian系统上做了一些事情,不允许我安装或删除任何东西。
EN

Stack Overflow用户
提问于 2020-09-05 03:43:18
回答 2查看 231关注 0票数 1

以下是apt更新/ apt升级/ apt dist升级的结果

代码语言:javascript
复制
sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  python-cryptography
1 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] y
Reading 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 syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax
dpkg: 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 1
Traceback (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 SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/python-cryptography_1.7.1-3+deb9u2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我不太清楚我在这里到底做了什么,但我无法克服。我似乎不能删除那个包,或者修复它,或者重新安装它,所有的东西都会因为这个或者类似的错误而失败。有人能帮我把这该死的东西处理掉吗?我已经试了几天了。

谢谢!

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2020-09-17 16:01:47

今天我也遇到了这个问题,python密码学也以类似的方式阻止了我。

我在python密码软件包上手动运行py洁净。我是root用户,所以您可能需要将sudo放在命令的前面。

/usr/bin/pyclean python-cryptography

这使我陷入了一组不同的错误(很可能与您的问题无关)。我的系统很坏),但是dpkg很高兴能重新开始工作。试试看

-Tom

票数 0
EN

Stack Overflow用户

发布于 2020-09-18 11:40:11

谢谢汤姆,虽然这不是我的问题,但它确实使我走上了正确的道路。基本上,这整个问题是因为我在某个时候将Python3.5设置为默认的,而且显然Debian由于任何原因都找不到解决这个问题的方法。我一恢复到2.7,一切都很好。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63750222

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档