Emacs 26.2 is installed with the application manager, not apt-get.

When calling it in the terminal I get :

samusz@samusz-K55:~$ emacs

La commande « emacs » n'a pas été trouvée, mais peut être installée avec :

sudo apt install emacs25      
sudo apt install emacs25-nox  
sudo apt install e3           
sudo apt install emacs25-lucid
sudo apt install jove         

(emacs command couldn't be found, but can be installed with...)

samusz@samusz-K55:~$ whereis emacs
emacs: /etc/emacs /usr/share/emacs
samusz@samusz-K55:~$ which emacs
samusz@samusz-K55:~$ ^C

there is no binary in /etc/emacs nor /usr/share/emacs, just config files !

So as a get-around I'll uninstall and get fresh binaries but I am interested as to what I do wrong. Or may be Ubuntu is not getting better if they can't configure the path when installing binaries.

I hate it when things get hidden away.

Is this a bug or a feature? (and if does it need reporting where ?)

(I was trying to get pdf-tools working when hit this wall)

  • If you think it is an Emacs bug, after checking comments and answers here, you can report it using M-x report-emacs-bug. If you think it's a Ubuntu bug then consider reporting it to the Ubuntu developers. – Drew May 3 at 17:37
  • Linux uses $ to identify environment variables. The percent symbol % is a Windows convention. Are you using Windows Subsystem for Linux? If so, you should state that in your question. – nega May 3 at 20:27
  • The binaries for anything installed with the Ubuntu package manager (which I'm pretty sure calls apt-get behind the scenes) should go into /usr/bin, or /bin/. It looks like your path is not set properly. It shouldn't include /etc/ or /usr/share, so whereis shouldn't report anything from those directories. – Tyler May 3 at 21:01
  • @nega Yes sorry I meant $PATH. Should I correct the title? – Samusz May 8 at 12:27

On Ubuntu 18.04, the emacs package is a meta-package. If we look at it's dependancies...

❯ apt-cache show emacs |grep Depends
Depends: emacs-gtk (>= 1:26.1) | emacs-lucid (>= 1:26.1) | emacs-nox (>= 1:26.1)

From the terminal we can find which dependency was installed...

❯ dpkg --get-selections |grep ^emacs
emacs                       install
emacs-bin-common            install
emacs-common                install
emacs-el                    install
emacs-gtk                   install
emacsen-common              install

In this case, you'll notice that of the three options, emacs-gtk was installed. We can then look at the contents of that package...

❯ dpkg -L emacs-gtk

You'll notice, that in /usr/bin the file emacs-gtk was installed.

You can find some other "emacs" stuff that might be installed in /usr/bin/

❯ ls -l /usr/bin/emacs*
lrwxrwxrwx 1 root root       23 May  3 16:04 /usr/bin/emacs -> /etc/alternatives/emacs*
lrwxrwxrwx 1 root root       29 May  3 16:04 /usr/bin/emacsclient -> /etc/alternatives/emacsclient*
-rwxr-xr-x 1 root root    31272 Apr 10 16:53 /usr/bin/emacsclient.emacs*
-rwxr-xr-x 1 root root 39926024 Apr 10 16:53 /usr/bin/emacs-gtk*

Alternatively you can use the search facilities at https://packages.ubuntu.com/.

If you think that a package is broken, file a bug with Ubuntu.

  • Thank you for your extensive reply. I'll check my path. I had felt I didn't use apt-get to install emacs as I wanted 26.2 version and this question steamed from getting a clean slate before reinstalling emacs. – Samusz May 8 at 12:36

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.