- uncomment deb-src
sudo vi /etc/apt/sources.list
- update
sudo apt-get update
- install dependencies
sudo apt-get build-dep emacs24
- prepare source (choose one from the following)
- download source package
wget http://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.xz
tar -xf emacs-24.5.tar.xz
- clone github repo
git clone [email protected]:emacs-mirror/emacs.git
git checkout emacs-25 # master is not as stable
./autogen.sh
./configure --prefix=/usr
Without --prefix=/usr
, the default prefix
goes to /usr/local
, and emacs will be installed to /usr/local/bin
instead of usr/bin
. Use ./configure --help
to check for other options.
-
make
-
sudo make install
-
clean up after install
make distclean
sudo make uninstall
. Note this will perform an uninstall based on the current configuration generated by ./configure
. So if we are trying to remove an emacs installed to /usr/bin
, make sure the current configuration is generated from ./configure --prefix=/usr