Create working directory, download and extract Emacs 24.2:
mkdir ~/src cd ~/src wget http://ftp.gnu.org/pub/gnu/emacs/emacs-24.2.tar.bz2 tar -xjvf emacs-24.2.tar.bz2 cd emacs-24.2
sudo apt-get install texinfo libncurses5-dev
(Optional) Install X related dependencies:
sudo apt-get install xorg-dev libpng12-dev libjpeg8-dev \ libgif-dev libtiff5 libtiff5-dev
Create /usr/local/bin/gcc-4.2 symlink:
sudo ln -s /usr/bin/gcc /usr/local/bin/gcc-4.2
Emacs' configure script seems to specifically look for
/usr/local/bin/gcc-4.2 which doesn't by default exist on Rasbian.
Run configure script:
./configure --prefix /opt/emacs
--without-x to the end of the configure command if you don't need X support.
Check emacs binary was built and works:
If Emacs loaded up alright, quit it and run make install:
Emacs binaries will now be available under
/opt/emacs/bin/. Run the following to to ensure it works: