无法升级或安装新软件包

无法升级或安装新软件包

在我删除 git 之前系统运行正常sudo apt --purge autoremove git

现在,每次我尝试安装某些软件包甚至运行时sudo apt upgrade都会出现以下错误

sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up emacs25 (25.2+1-6) ...
/var/lib/dpkg/info/emacs25.postinst: 35: /var/lib/dpkg/info/emacs25.postinst: /usr/lib/emacsen-common/emacs-install: not found
dpkg: error processing package emacs25 (--configure):
 installed emacs25 package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of emacs:
 emacs depends on emacs25 | emacs25-lucid | emacs25-nox; however:
  Package emacs25 is not configured yet.
  Package emacs25-lucid is not installed.
  Package emacs25-nox is not installed.

dpkg: error processing package emacs (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of git-el:
 git-el depends on emacs | emacsen; however:
  Package emacs is not configured yet.
  Package emacsen is not installed.
  Package emacs25 which provides emacsen is not configured yet.

dpkg: error processing package git-el (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of git-all:
 git-all depends on git-el; however:
  Package git-el is not configured yet.

dpkg: error processing package git-all (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 emacs25
 emacs
 git-el
 git-all
E: Sub-process /usr/bin/dpkg returned an error code (1)

emacs 26.3 已从源代码构建,并且运行良好。请帮我解决这个问题。

短暂性失眠!

答案1

如果你还没有解决这个问题,请查看这个邮政可能会有帮助。例如,进行一些调整,而不是根据你的情况sudo rm /var/lib/dpkg/info/emacs24.postinst使用。sudo rm /var/lib/dpkg/info/emacs25.postinst

如果有帮助的话请接受,加油!

相关内容