Build Emacs on Debian 9

# install git
$ sudo apt install git

# install build dependencies of emacs 25 (the current version in Debian repo)
$ sudo apt build-dep emacs25

# clone the master branch of repo (current bleeding-edge version is 25)
# download size approx. 235 MiB
$ git clone -b master git://

# or alternatively, you can download the current stable release of emacs
# download size approx. 55 MiB
# Switzerland mirror
# change directory
$ cd emacs

# generate configure script
$ ./ all

# configure your build
$ ./configure --with-mailutils

# build emacs
$ make

# run emacs (the binary file is in src/emacs directory)
$ src/emacs

# (optional) move the binary files to the system directory to be available globally
$ sudo make install

# (optional) uninstall the newly installed emacs
# change to the emacs source directory
$ cd emacs
$ sudo make uninstall

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.