Score:0

emacs installation broke my apt and dpkg system

je flag

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
Organic Marble avatar
us flag
Please edit your question to give details about how you installed it.
Bodo avatar
pt flag
You could try to purge the emacs packages, manually clean up your non-apt installation and then install again.
BeastOfCaerbannog avatar
ca flag
@mcExchange I can see that you have deleted the answer you provided to your question. Is there a specific reason for that (for example, you later found out that it didn't work)? Because otherwise it should be undeleted as it seems helpful.
je flag
Yes, I still have issues scratching emacs entirely from my system. At first I could `dpkg remove ` emacs packages then `apt remove ` emacs packages. After that apt was working in the sense that I could install another package not related to emacs (`apt-transport-https` ) as mentioned in the question. However trying to reinstall emacs via apt brought back the error mentioned in the question, so I was not able to cleanly remove emacs after all. I updated my question with some more context therefore and leave it open until I get a solution to fully repair my apt + emacs config
RubeRad avatar
id flag
I have the same problem, from a fresh install of 22.04 I installed a bunch of common stuff, including "sudo apt install emacs", and because of an error from the post-installation-script of emacs-gtk, it's stuck, I don't know how to get out
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.