如何删除损坏的包点击?我正在尝试在我的 14.04 Ubuntu 中安装 ubuntu-sdk。我的错误太多了。
sudo apt-get autoremove -f click
Reading package lists ... Done
Building dependency tree
Is read status information ... Done
The following packages will be REMOVED:
click
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation released 166 ks of disk space.
Do you want to continue? [Y/n] y
(Reading database ... 350824 files and directories currently installed.)
Removing click (0.4.38.5-0~457~ ubuntu14.04.1) ...
Trace Back (most recent call last):
File "/usr/bin/click", line 31, in <module>
from click import commands
Import Error: can not import name 'commands'
dpkg: error processing package click (--remove):
subprocess command file pre-removal installed returned error exit status 1
Reading was too many errors:
click
E: Sub-process /usr/bin/dpkg Returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
如果我尝试命令 sudo apt-get purge -f
发生了同样的错误。
A.B*_*.B. 31
在那之后没有成功,我已经测试了这种“艰难的方式”......而且......它有效!
sudo rm /usr/bin/click
sudo apt-get autoremove -f click
Run Code Online (Sandbox Code Playgroud)
该文件在导入 Python 模块时出现问题,并且您无论如何都想删除该包。因此,可以手动删除该文件。
Iho*_*ura 11
升级 14.04 -> 14.10 -> 15.04 后,我遇到了同样的错误,损坏的包点击和点击 apparmor、url-dispatcher
*更新:
我的解决方案是删除包文件夹rm -rv /usr/local/lib/python3.4/dist-packages/click
,然后:
sudo apt-get update && sudo apt-get install -f
sudo apt-get remove click
sudo pip3 uninstall click
sudo pip uninstall click
sudo apt-get install click -f
Run Code Online (Sandbox Code Playgroud)
问题是很多升级用户会在他们的pip或pip3存储库下安装一个带有版本号的click版本,这些不是由apt管理的,它们在import调用Python的关键字时优先。
因此,您需要先卸载它们,然后再重新安装 Click 才会对您有任何好处。它们可能被安装的原因是它可能发生在第三方 python 应用程序的设置过程中,天知道我已经做了一些。
| 归档时间: |
|
| 查看次数: |
9573 次 |
| 最近记录: |