38

This is my first time using Ubuntu and I dont know how I should install a program on it. I tried using cd the directory where it is and then ./configure it but it is not working!

anita
  • 389

5 Answers5

38

Consider using Damien Cassou's PPA:

To add this PPA:

sudo add-apt-repository ppa:cassou/emacs
sudo apt-get update

For emacs-snapshot:

sudo apt-get install emacs-snapshot-el emacs-snapshot-gtk emacs-snapshot

Or, for emacs24 (i.e. 24.3, stable):

sudo apt-get install emacs24 emacs24-el emacs24-common-non-dfsg

Update

As mentioned in Damien Cassou's PPA, the repository will not be maintained further (currently features Emacs 24.3) and it is recommended to use the Ubuntu Elisp PPA.

Hence, use this to add the PPA:

sudo add-apt-repository ppa:ubuntu-elisp/ppa
sudo apt-get update
sudo apt-get install emacs-snapshot emacs-snapshot-el

Ref: Emacs guide

hayd
  • 2,397
26

You'll probably be better off using the version of emacs already built, tested, and packaged by Ubuntu rather than building it on your own, unless you need specific features that are only available in 24.3.

In a terminal:

sudo apt-get install emacs
Paul
  • 7,194
3

Building it from source is not bad because you can choose the version that you need and Emacs will work even faster, the trouble is finding and installing dependencies.

Commands to install Emacs 24.5 w/ dependencies:

sudo apt-get update
sudo apt-get install build-essential
sudo apt-get build-dep emacs24
cd ~/Downloads
wget "http://gnu.mirrors.hoobly.com/gnu/emacs/emacs-24.5.tar.gz"
tar xvzf emacs-24.*.tar.gz
cd emacs-24.*
./configure --without-x
make
sudo make install

Done.

waltinator
  • 37,856
Nau
  • 353
2

I'm using Ubuntu 14 LTS - x64 and following command works for me ;

sudo apt-get install emacs24

For Daily Emacs build installation ;

sudo apt-add-repository ppa:ubuntu-elisp/ppa
sudo apt-get update
sudo apt-get install emacs-snapshot emacs-snapshot-el

Reference : Emacs Guide

-1

The short answer: go back to Ubuntu 16 or earlier.

I just installed Ubuntu 18. The broken scrollbars in emacs 25.2.2 were driving me crazy. The other solutions here didn't work (apt no longer allows unsigned repos). I was able to install emacs 23.4 from the debian packages as follows:

https://packages.debian.org/wheezy/all/emacs23-common/download

dpkg -i emacs23-common_23.4+1-4+deb7u1_all.deb

https://packages.debian.org/wheezy/emacs23-bin-common

dpkg -i emacs23-bin-common_23.4+1-4+deb7u1_amd64.deb

https://packages.debian.org/wheezy/amd64/libgif4/download

dpkg -i  libgif4_4.1.6-10+deb7u1_amd64.deb

https://packages.debian.org/wheezy/amd64/xaw3dg/download

dpkg -i xaw3dg_1.5+E-18.2_amd64.deb

https://packages.debian.org/wheezy/amd64/libpng12-0/download

dpkg -i libpng12-0_1.2.49-1+deb7u2_amd64.deb

https://packages.debian.org/wheezy/amd64/libtiff4/download

dpkg -i libtiff4_3.9.6-11+deb7u10_amd64.deb

https://packages.debian.org/wheezy/emacs23-lucid

dpkg -i emacs23-lucid_23.4+1-4+deb7u1_amd64.deb

I'm guessing that this technique would work for emacs 24.3 too.

But you don't want Ubuntu 18. The gnome volumes break everything; after a few reboots, ALL the local volume mounts fail (even /boot/efi, despite the hardware obviously having worked in memfs to get as far as local mount scripts), and you have to mount them manually in the emergency shell every time. Go back to Ubuntu 16, which comes with emacs 24.