Skip to content

Instantly share code, notes, and snippets.

@Yevgnen
Forked from kissge/emacs26.sh
Created June 3, 2018 11:09
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save Yevgnen/316e7e69fc224d0c2722222795944c84 to your computer and use it in GitHub Desktop.
Save Yevgnen/316e7e69fc224d0c2722222795944c84 to your computer and use it in GitHub Desktop.
Compile Emacs 26 on Ubuntu 16.04
mkdir emacs
cd emacs
git init
git remote add origin https://github.com/emacs-mirror/emacs.git
git fetch --depth 1 origin emacs-26
git reset --hard FETCH_HEAD
sudo apt install autoconf make gcc texinfo libgtk-3-dev libxpm-dev libjpeg-dev libgif-dev libtiff5-dev libgnutls-dev libncurses5-dev
./autogen.sh
./configure
make
sudo make install
@duianto
Copy link

duianto commented Aug 30, 2019

While testing these instructions in Ubuntu 18.04.3.
When I got to line 7: sudo apt install autoconf make gcc ...
I got this message:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libgnutls-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libgnutls-dev' has no installation candidate

Searching for the error message found this comment:

Welcome to Ask Ubuntu! Could you please edit your question to include your Ubuntu release? libgnutls-dev certainly exists in Xenial but it was renamed to libgnutls28-dev in Bionic. – David Foerster Jul 23 '18 at 15:21

source: https://askubuntu.com/questions/1058694/libgnutls-dev-has-no-installation-candidate-error-while-installing-ubuntu-as-a#comment1732060_1058694

And it worked to rename libgnutls-dev to libgnutls28-dev.
The updated line 7 for Ubuntu 18.04.3 is:

sudo apt install autoconf make gcc texinfo libgtk-3-dev libxpm-dev libjpeg-dev libgif-dev libtiff5-dev libgnutls28-dev libncurses5-dev

Emacs 26.3 from the Ubuntu Software application doesn't have module support
https://www.gnu.org/software/emacs/manual/html_node/elisp/Dynamic-Modules.html
which is needed when testing vterm https://github.com/akermu/emacs-libvterm
To compiled Emacs with module support, line 9 should be changed to:
./configure --with-modules

Emacs is now up and running, thanks for the instructions.

@Yevgnen
Copy link
Author

Yevgnen commented Sep 3, 2019

Thanks for the details and glad that help!

@easbarba
Copy link

easbarba commented Dec 17, 2019

apt build-dep emacs
git reset --> make bootstrap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment