Compile Emacs 24.2 on Raspberry Pi (Rasbian)
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
Install dependencies:
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
Add --without-x
to the end of the configure command if you don't need X support.
Run make:
make
Check emacs binary was built and works:
./src/emacs
If Emacs loaded up alright, quit it and run make install:
make install
Emacs binaries will now be available under /opt/emacs/bin/
. Run the following to to ensure it works:
/opt/emacs/bin/emacs
Written by Jim Myhrberg
Related protips
3 Responses
Thanks for this!
I can recommend the emacs-live configuration from here, which requires emacs24: http://github.com/overtone/emacs-live
Thanks to share this tip !
Thank you the tip. Raspbian these days includes gcc-4.6 and it had both /usr/bin/gcc and /usr/bin/gcc-4.6 accessible.