emacs - 如何删除emacs full?
问题描述
我在我的 Ubuntu 中安装了 Emacs,但我无法卸载(也无法再安装任何东西)
▶ sudo apt-get install tig
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
emacs-bin-common : Depends: emacs-common (= 1:26.1+1-3.2ubuntu2) but it is not going to be installed
emacs-el : Depends: emacs-common (= 1:26.1+1-3.2ubuntu2) but it is not going to be installed
emacs-gtk : Depends: emacs-common (= 1:26.1+1-3.2ubuntu2) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我尝试运行命令apt --fix-broken install
,但收到以下错误消息:
▶ sudo apt --fix-broken install -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
emacs-common
Suggested packages:
emacs-common-non-dfsg ncurses-term
The following NEW packages will be installed:
emacs-common
0 upgraded, 1 newly installed, 0 to remove and 133 not upgraded.
3 not fully installed or removed.
Need to get 0 B/13,3 MB of archives.
After this operation, 68,4 MB of additional disk space will be used.
(Reading database ... 185527 files and directories currently installed.)
Preparing to unpack .../emacs-common_1%3a26.1+1-3.2ubuntu2_all.deb ...
Unpacking emacs-common (1:26.1+1-3.2ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives/emacs-common_1%3a26.1+1-3.2ubuntu2_all.deb (--unpack):
trying to overwrite '/usr/share/emacs/site-lisp/subdirs.el', which is also in package emacs26-common 26.2~1.gitfd1b34b-kk1+19.04
Errors were encountered while processing:
/var/cache/apt/archives/emacs-common_1%3a26.1+1-3.2ubuntu2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我该怎么做才能解决这个问题?
谢谢
解决方案
尝试删除缺少依赖项的损坏包,例如
sudo apt remove --purge emacs-bin-common emacs-el emacs-gtk
如果这不起作用,请添加 --force 标志再试一次。
您最初是如何尝试卸载 emacs 的?
推荐阅读
- python - 如何在 Python 中异步接收来自多个 WebSocket 的数据?
- codenameone - 代号 One gui builder 4.32
- scala - 当函数选择列时使用 SparkSQL
- login - 如何在没有端点方法的情况下继续使用 HybridAuth 3
- bash - 使用 sudo 时如何使用 tee
- delphi - 如何在 Delphi 中使用 RTTI 或 TypeInfo 获取枚举的有效范围
- android - 将 Unit Test App Nunit Lite Xamarin 中的引用添加到 Xamarin 服务后重建失败
- php - 关闭浏览器时如何将非常繁重的任务的执行留在队列中(在后台运行)?
- node.js - 如何防止像 SQL 注入这样的 mongo?
- json - 如何迭代层次结构中的 JSON 对象?