我只是想做:
sudo apt install emacs
在Ubuntu 20.04上。
结果是,在emacsen-common
中安装emacs-gtk
时出现了错误,这最终是所有emacs的依赖关系。我看到的错误是:
Setting up emacs-gtk (1:26.3+1-1ubuntu2) ...
Install emacsen-common for emacs
emacsen-common: Handling install of emacsen flavor emacs
emacs: error while loading shared libraries: libotf.so.0: cannot open shared object file: No such file or directory
ERROR: install script from emacsen-common package failed
dpkg: error processing package emacs-gtk (--configure):
installed emacs-gtk package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of emacs:
emacs depends on emacs-gtk (>= 1:26.3) | emacs-lucid (>= 1:26.3) | emacs-nox (>= 1:26.3); however:
Package emacs-gtk is not configured yet.
Package emacs-lucid is not installed.
Package emacs-nox is not installed.
dpkg: error processing package emacs (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
emacs-gtk
emacs
E: Sub-process /usr/bin/dpkg returned an error code (1)
我希望能得到一些关于如何解决这个问题的想法。
发布于 2020-05-11 19:42:41
为了解决这个问题,我首先做了sudo apt purge emacs
。
然后使用以下方法重新安装libotf0和libm17n-0:
sudo apt install --reinstall libotf0 libm17n-0
之后,sudo apt install emacs
如愿以偿地工作。
发布于 2020-07-11 05:47:57
还可以用另一种方式来实现:通过止动存储使用snap包
发布于 2021-06-27 13:28:40
我也遇到了类似的问题,安装emacs会导致安装后脚本错误,显然与elpa公司的包有关。这是在Kubuntu从20.10升级到21.04和运行21.04的时候发生的。
感谢大家给出的好提示,在尝试了几件事情之后,这个问题在我清除了所有emacs*包之后得到了解决:
sudo dpkg --purge --force-depends emacs emacs-common ...
安装除emacs和emacs以外的所有emacs*包,使用:
apt-get download <package>
sudo dpkg -i --force-depends <package_file>
安装了上面的emacs,最后安装emacs (sudo apt install emacs
)。
https://askubuntu.com/questions/1237698
复制相似问题