AUCTeX 安装失败“处理 /usr/share/emacs24/site-lisp/debian-startup.el 时发生错误”

AUCTeX 安装失败“处理 /usr/share/emacs24/site-lisp/debian-startup.el 时发生错误”

我开始在新款联想 Thinkpad X1 Carbon(第三代)上使用 Debian Testing。我以“通常的方式”安装了 Emacs 和 AUCTeX:。sudo apt-get install emacs24 auctex我的.emacs包含(多年来,在 Ubuntu 下):

(add-to-list 'load-path "/usr/share/emacs/site-lisp")
(require 'tex-site)

当我启动 emacs 时,出现错误提示tex-site.el无法找到。然后我查找/usr/share/emacs/site-lisp(以及将 emacs 替换为 emacs24 的相应路径……我不知道哪个是“正确的”),但这些文件夹是空的。我以为安装过程中出了问题,想使用从头开始sudo apt-get purge...,但我得到了:

$ sudo apt-get purge emacs24 emacs24-bin-common emacs24-common emacsen-common auctex
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libwebkitgtk-3.0-0 : Depends: libenchant1c2a (>= 1.6.0) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

我有点疑惑,Some packages could not be installed...因为我尝试过消除它们(我也用过sudo apt-get remove...)。但是如果我尝试重新安装,我会得到:

$ sudo apt-get install emacs24 auctex
Reading package lists... Done
Building dependency tree       
Reading state information... Done
auctex is already the newest version.
emacs24 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up auctex (11.87-3+deb8u1) ...
Install emacsen-common for emacs24
emacsen-common: Handling install of emacsen flavor emacs24
Wrote /etc/emacs24/site-start.d/00debian-vars.elc
>>Error occurred processing /usr/share/emacs24/site-lisp/debian-startup.el: File error (("Opening input file" "no such file or directory" "/usr/share/emacs24/site-lisp/debian-startup.el"))
ERROR: install script from emacsen-common package failed
dpkg: error processing package auctex (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 auctex
E: Sub-process /usr/bin/dpkg returned an error code (1)

如何解决?我应该手动删除与 emacs 相关的文件夹,然后再试一次吗?我知道这是一种黑客行为,我可能不应该purge早点这样做,但现在的情况就是这样。

答案1

我刚刚看到此错误报告并将解决方法调整为sudo rm /var/lib/emacsen-common/state/flavor/installed/emacs24。然后就sudo apt-get install emacs24 auctex成功了。

相关内容