如果我想编译 Emacs,我需要安装哪些库?

mic*_*ael 25 emacs

我正在尝试emacs在 Ubuntu 12.04上编译。这是因为我想使用 Emacs 24.2。

但是,我收到以下错误。我该如何解决?

checking for long file names... yes
checking for X... no
checking for X... true
configure: error: You seem to be running X, but no X development libraries
were found.  You should install the relevant development files for X
and for the toolkit you want, such as Gtk+, Lesstif or Motif.  Also make
sure you have development files for image handling, i.e.
tiff, gif, jpeg, png and xpm.
If you are sure you want Emacs compiled without X window support, pass
  --without-x
to configure.
Run Code Online (Sandbox Code Playgroud)

Ado*_*obe 29

我以前是这样做的:

sudo apt-get install build-essential texinfo libx11-dev libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev libgtk-3-dev libncurses-dev libgnutls28-dev
# for gtk2 build replace libgtk-3-dev with libgtk2.0-dev

git clone --depth=1 git://git.savannah.gnu.org/emacs.git
cd emacs
./autogen.sh # not needed when installing from tarball
./configure
make bootstrap
sudo make install
Run Code Online (Sandbox Code Playgroud)

要构建文档:

make docs
# or build just the format you want:
make info
make dvi
make html
make pdf
Run Code Online (Sandbox Code Playgroud)

但现在我只使用这个包

sudo add-apt-repository -y ppa:ubuntu-elisp
sudo apt-get update
sudo apt-get install emacs-snapshot
Run Code Online (Sandbox Code Playgroud)


Flo*_*sch 15

如果你跑

sudo apt-get build-dep emacs23
Run Code Online (Sandbox Code Playgroud)

安装编译emacs23包所需的一切。很可能这也足以编译 Emacs 24.2。

  • 或者,在 Ubuntu 14 中:`sudo apt-get build-dep emacs24` (5认同)
  • 如果您正在运行 >=16.04 并得到 ```E: You must put some 'source' URIs in your sources.list```,请参阅 [这个问题](http://askubuntu.com/questions/761357/how -to-automatically-update-etc-apt-sources-list-with-source-uris-on-ubuntu-16) (3认同)