I had a fresh install of Ubuntu 18.04.1 and Emacs 26 compiled from source. However I notice somehow the system always installs Emacs 47.0 which is Emacs 25.2.2 from the official Ubuntu repository. This completely destroys my Emacs 26 installation and I have absolutely no idea why this should/could happy, i.e. no warning or reminder. Has anyone else experienced this similar issue? Or could anyone point me to where to start to diagnose the automatic installation occurs? Thanks in advance!

  • 1
    If you sudo apt purge emacs the system will think emacs is not installed (and doesn't need to be upgraded). Then install your emacs. – waltinator Nov 18 '18 at 23:38
  • I followed this ask ubuntu post and this blog post to completely remove the automatically installed emacs 25. locate emacs25 and updatedbshows no emacs25 related files remaining in the system. I am trying your suggestions now and see if it's going to work. – Fanpeng Nov 19 '18 at 0:30
  • Here's your warning or reminder: Apt does not know about non-deb software, does not care, and will happily overwrite it. If you use non-deb software on your system, use /usr/share/local or /opt to avoid file conflicts with debs. – user535733 Nov 19 '18 at 0:50
  • 1
    @user535733 Please excuse my ignorance, but what do you mean non-deb software? I complied emacs 26 from source, generated the .deb package with checkinstall' and installed with dpkg -i. Furthermore, why should Apt overwrite emacs 26 if I did not do any apt upgrade` at all? So far, I have hold the emacs 26 with dpkg --set-selections. It looks like the problem has been solved after several reboot, but to be honest, I am still confused why this overwrite should happen. – Fanpeng Nov 19 '18 at 1:02
  • Lot of good information there that needs to be in the original question, not buried among comments. You are still asking us to be rather psychic, and there are several possibilities: Perhaps you used an unwise version number, maybe you ran an apt command not realizing what it would do, or maybe you didn't use apt-pinning or apt-marking to hold the current version, etc. Lots of possible traps for the unwary. – user535733 Nov 19 '18 at 1:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.