编译 Emacs 时出现问题(未找到 x 开发库)

kan*_*anr 5 apt xorg emacs compiling

我还是 Ubuntu/Linux 的新手

我正在安装 Emacs(版本 25.1),我已经下载了源文件,解压缩并使用 tar

看来我得用 . /configure. 计算机工作了一段时间并给了我这个结果:


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+ 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)

我在互联网上查看了这个问题,一个线程中的回复说要使用:

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

这将安装编译emac23包所需的一切,但是当我这样做时,我得到:

E: Unable to find a source package for emacs25.1
Run Code Online (Sandbox Code Playgroud)

在软件和更新屏幕中,我启用了源代码选项。我登记了etc/apt/sources.list.d文件夹,它是空的。

我不知道该怎么做。如果一切都失败将编译emacs没有 x window 支持的情况下会导致以后出现问题吗?

我应该尝试手动安装 x 开发文件、工具包文件、图像处理文件。我该怎么做。

编辑:

所以我使用预先构建的包安装了 Emacs。使用命令:

sudo apt-get install emacs
Run Code Online (Sandbox Code Playgroud)

编辑2:

在 2019 年我现在使用 VIM 编辑器,所以现在无法解决这个问题。但是,如果您有答案,请随时离开

小智 5

你有什么版本的 Ubuntu?我从gnu emacs 站点下载了 tar'd 源。我跑了:

./configure
Run Code Online (Sandbox Code Playgroud)

它告诉我我需要libXpmlibgif/libungif。我安装libXpm-devlibgif-dev使用:

sudo apt-get install libxpm-dev libgif-dev
Run Code Online (Sandbox Code Playgroud)

安装这些后,我重新运行配置(./configure ),然后我就可以构建它了。

我现在emacs在我的emacs-25.1/src目录中有一个名为的二进制文件emacs-25.1.1,它可以工作。