Installing emacs without root permissions on linux
Facts - Editor: emacs
Thursday, 26 May 2011 21:37

This note is for emacs 22 and 23 and various linux systems.

First I tried to install emacs 23 as a non root user on linux but I got the following error message when running configure:

checking for alloca... no
checking whether `alloca.c' needs Cray hooks... no
checking stack direction for C alloca... -1
configure: error: a system implementation of alloca is required

The solution was installing emacs 22.3 instead since this is the last version not requiring the alloca library.

So I compiled emacs 22.3, and still I did not have the permissions to do a proper install as root, e.g. under directory /local. After running the configure and make commands I edited the makefile to make sure the command make install copied the binaries to the tree ~/local instead of to /local. Unfortunately this did not work. Emacs came with the following error message: set-keyboard-coding-system: Cannot open load file: encoded-kb and it was not able to load my .emacs file.

This problem was solved by building and installing again but then in the first step with running the configure command with the option --prefix=~/local. This option replaces the editing of the makefile.