uztyfw
Last Updated: February 25, 2016
·
5.75K
· jimeh
C48498c82bfaf0c6c8843ba85e3cd598

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

3 Responses
Add your response

3938
Acf0cac2bfd4255c84969906f52c53cd

Thanks for this!
I can recommend the emacs-live configuration from here, which requires emacs24: http://github.com/overtone/emacs-live

over 1 year ago ·
4065
385940666f9ef223e65a5032a340295b

Thanks to share this tip !

over 1 year ago ·
13584
0 r9mlmnc1ki9g do7tnxvmzc x65lrea7tassmzkfriltfajfyrydcvx3oelmpsf azurntmmvlkl

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.

over 1 year ago ·