Quick instructions for installing Emacs 27 on CentOS 7 since it doesn't seem to be available in any popular yum repositories.
Install dependencies:
# Note: This installs dependencies for X11 as well. Change this and the ./configure below if you don't want any X11 deps
sudo yum install \
GConf2-devel \
Xaw3d-devel \
dbus-devel \
dbus-glib-devel \
dbus-python \
gcc \
giflib-devel \
gnutls-devel \
gpm-devel \
gtk+-devel \
gtk2-devel \
ImageMagick \
ImageMagick-devel \
jansson-devel \
libX11-devel \
libXft-devel \
libXpm-devel \
libjpeg-devel \
libpng-devel \
libtiff-devel \
libungif-devel \
make \
ncurses-devel \
pkgconfig \
texi2html \
texinfo
Clone the emacs git repo and checkout the correct tag. Use git tag -l
to see what tags are available.
git clone https://git.savannah.gnu.org/git/emacs.git
cd emacs
git tag -l
git checkout emacs-27.1.91
Run autogen and configure. When running ./configure
, double check the output to ensure any features you need are enabled. E.g.: Look for Does Emacs use -ljansson? yes
to make sure native json support will be compiled in. If something you need is not enabled, additional dependencies may need to be installed first.
./autogen.sh
./configure --without-selinux
Compile and install. Should go to /usr/local/bin
by default, but can be changed with options to ./configure
.
make -j4 && sudo make install