因此我尝试通过这个 PPA 安装 Emacs。
sudo add-apt-repository ppa:kelleyk/emacs
sudo apt-get update
sudo apt-get install emacs26
然后我收到这个错误。
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).
如果我继续运行此命令。
sudo apt --fix-broken install
我得到了这个回复
...
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)
有人知道我下一步可以尝试什么吗?
答案1
因此在通过以下方式升级我的依赖项之后
sudo apt-get upgrade
它又开始工作了。我猜我之前的版本坏了,现在不行了[