几周前,我搞砸了 emacs 的安装,现在我无法再使用以下方式安装其他软件包dpkg
例如
sudo apt install apt-transport-https
给我
>>Error occurred processing *.el: File error (("Opening input file" "No such file
or directory" "/usr/share/emacs25/site-lisp/elpa/magit-popup-2.11.0/*.el"))
ERROR: install script from elpa-magit-popup package failed
dpkg: error processing package emacs25-nox (--configure):
installed emacs25-nox package post-installation script subprocess returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of emacs-nox:
emacs-nox depends on emacs25-nox; however:
Package emacs25-nox is not configured yet.
dpkg: error processing package emacs-nox (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
emacs25-nox
emacs-nox
E: Sub-process /usr/bin/dpkg returned an error code (1)
这似乎与安装任务无关。
做事sudo apt --fix-broken install
让我
>>Error occurred processing *.el: File error (("Opening input file" "No such file or directory" "/usr/share/emacs25/site-lisp/elpa/magit-popup-2.11.0/*.el"))
ERROR: install script from elpa-magit-popup package failed
dpkg: error processing package emacs25-nox (--configure):
installed emacs25-nox package post-installation script subprocess returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of emacs-nox:
emacs-nox depends on emacs25-nox; however:
Package emacs25-nox is not configured yet.
dpkg: error processing package emacs-nox (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
emacs25-nox
emacs-nox
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt autoremve
也没用。我没什么主意了。
有谁知道如何解决这一问题?
语境:
- 我想我犯了一个大错误,在安装了系统默认的 emacs25 的同时还安装了非 apt 版本的 emacs(因为我无法让 magit 工作),这就是事情开始破坏一切的原因。
- 我的系统:Ubuntu 18.04
更新
评论者 1:我是如何安装 emacs 的?我不再确定如何使用 dpkg 安装 emacs。我假设我从某个地方下载了一个 deb 文件并安装了它。在 bash 历史记录中,我可以找到
sudo dpkg -i --force-all /var/cache/apt/archives/emacs25-common_25.3~1.gite0284ab-kk1+18.04_all.deb
sudo dpkg -r emacs
sudo dpkg -r emacs-nox
sudo dpkg -r emacs25-*
sudo dpkg -r emacs25-bin-common
sudo dpkg -r emacs25-nox
sudo dpkg -r emacs25-bin-common
sudo dpkg -r elpa-dash
sudo dpkg --purge --force-depends emacs
sudo dpkg --purge emacs
sudo dpkg -r --force-all /var/cache/apt/archives/emacs25-common_25.3~1.gite0284ab-kk1+18.04_all.deb
我也做过apt autoremove
几次
定位 *.deb 找到
/var/cache/apt/archives/emacs25-bin-common_25.2+1-6_amd64.deb
/var/cache/apt/archives/emacs25-common_25.2+1-6_all.deb
/var/cache/apt/archives/emacs25-el_25.2+1-6_all.deb
/var/cache/apt/archives/emacs25_25.2+1-6_amd64.deb
/var/cache/apt/archives/emacs_47.0_all.deb