0

System was working fine before I removed git using sudo apt --purge autoremove git

Now, every time I try to install some package or even run sudo apt upgrade I get the following error

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 has been built from source and is working fine. Please help me solve this problem.

TIA!

  • You haven't mentioned OS/release details, in another question on the same day however you said you were on Elementary - please confirm with OS/release details. – guiverc May 17 '20 at 03:08

1 Answers1

0

If you haven't resolved this yet take a look at this post might help. Make a few adjustments, for instance, instead of sudo rm /var/lib/dpkg/info/emacs24.postinst use sudo rm /var/lib/dpkg/info/emacs25.postinst for your case.

Accept if it helps, cheers!