python-3.x - 如何修复 idle-python3.6?

标签 python-3.x ubuntu python-idle

我对 python idle 有很大的问题。例如,如果我尝试运行
sudo apt-get install apache2我收到此错误:

E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
And it is not just for apache, it happens for all the apps that I try to install with sudo apt-get install

我试过 unistall idle,但它不起作用

如果我跑
sudo apt-fix broken install 

我收到此错误:
dpkg: error processing archive /var/cache/apt/archives/idle-python3.6_3.6.8-1~18.04.york0_all.deb (--unpack): trying to overwrite '/usr/lib/python3.6/idlelib/CREDITS.txt', which is also in package libpython3.6-stdlib:amd64 3.6.8-1+xenial1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/idle-python3.6_3.6.8-1~18.04.york0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

的输出
 sudo dpkg --configure -a


dpkg: dependency problems prevent configuration of idle:
idle depends on idle-python3.6; however:
Package idle-python3.6 is not installed.


dpkg: error processing package idle (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
idle
cat /etc/apt/sources.list 的输出是
deb http://archive.ubuntu.com/ubuntu bionic main universe
deb http://security.ubuntu.com/ubuntu/ bionic-security main universe
deb http://archive.ubuntu.com/ubuntu bionic-updates main universe

如果我尝试使用以下命令重新安装:
 sudo apt install idle-python3.6

我明白了:
dpkg: error processing archive /var/cache/apt/archives/idle-python3.6_3.6.8-1~18.04.york0_all.deb (--unpack):
 trying to overwrite '/usr/lib/python3.6/idlelib/CREDITS.txt', which is also in package libpython3.6-stdlib:amd64 3.6.8-1+xenial1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/idle-python3.6_3.6.8-1~18.04.york0_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我不知道该怎么办

最佳答案

我认为这是由于配置错误导致的依赖问题。

您可以引用有类似问题的 ubuntu 论坛:
https://askubuntu.com/questions/1065556/broken-python-dependencies-after-trying-to-re-install

关于python-3.x - 如何修复 idle-python3.6?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57766173/

相关文章:

python - 从 for 循环写入多个输出文件

ubuntu - 如何将默认的 binutils 转换为 binutils-2.26?

javascript - 是否可以跨标签检测空闲时间?

每次运行新模块时都会重新启动 Python shell

python - 如何在 Python 3 中获取当前语言环境的字母表?

python - python中的列表切片问题

python - 无法创建 Django 模型的实例

bash - Ubuntu bash 脚本 - 搜索所有文件夹以运行视频转换

file - Ubuntu nautilus Home 的路径是/root,我怎样才能把它改成/home/username?

python - 程序执行时pyqtgraph plot不显示