emacs_tutorial/doc/compile.org

2.1 KiB

Compiling emacs in GNU linux systems

Emacs is available in all GNU-linux distributions. If you want to install emacs directly from any free-software distribution, you may check this information. However, you may be interested in compiling emacs for your operational system.

To compile emacs it's important to install some development libraries before downloading the emacs tarball.

Below there are options to compile emacs in debian-like free software distributions

Install build-essential

  sudo apt install build-essential
  sudo apt update && sudo apt build-dep emacs

Download emacs (tarball), extract and open the source directory

Visit the Emacs website

Let's say you want to download emacs 28.2. You may use wget to download the tarball:

  wget http://ftp.gnu.org/gnu/emacs/emacs-28.2.tar.gz

Then, extract the files and open a terminal within the main directory of the package.

   tar xvfz emacs-28.2.tar.gz

Change the directory to the extracted files:

  cd emacs-28.2

Execute the following commands in a terminal to begin with the process

Run the autogen.sh script. The script should be inside the emacs directory.

  ./autogen.sh

Configure

  ./configure

Make the package and install in the system

  make
  sudo make install

Facing problems due to lack of XLibs in Debian system

Install the following libraries: (for PureOS or Debian Buster):

libc6-dev libjpeg62-turbo libncurses5-dev libpng-dev libtiff5-dev libgif-dev xaw3dg-dev zlib1g-dev libx11-dev

To install, use:

  apt install

References