I messed around with emacs installation some weeks ago, now I cannot install other packages anymore using dpkg
for example
sudo apt install apt-transport-https
gives me
>>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)
which seems unrelated to the install task.
Doing sudo apt --fix-broken install
gives me
>>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
didn't help either. I'm running out of ideas.
Does anyone know how to fix this?
Context:
- I guess I did the big mistake of installing a non-apt version of emacs along with the system's default emacs25 (because I couldn't get magit to work), this is were things started to break everything.
- my system: Ubuntu 18.04
Update
commentor 1: how did I install emacs?
I'm not sure anymore how I installed emacs using dpkg. I assume I downloaded a deb file from somewhere and installed it. In bash history I can find
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
I also did apt autoremove
a couple of times
locate *.deb finds
/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