如何在主目录中编译并安装Emacs?

问题描述

我想不使用APT / YUM来安装Emacs,因为我不是超级用户

我从下载了源代码 https://www.gnu.org/software/emacs/manual/html_node/efaq/Installing-Emacs.html 。然后,我命令

./configure --prefix=$HOME/.local/emacs/27_1

标准输出表示

configure: error: The following required libraries were not found:
     gnutls
Maybe some development libraries/packages are missing?
To build anyway,give:
     --with-gnutls=ifavailable
as options to configure.

所以我命令了

./configure --with-gnutls=ifavailable --prefix=$HOME/.local/emacs/27_1

标准输出表示

configure: error: The required function 'tputs' was not found in any library.
The following libraries were tried (in order):
  libtinfo,libncurses,libterminfo,libcurses,libtermcap
Please try installing whichever of these libraries is most appropriate
for your system,together with its header files.
For example,a libncurses-dev(el) or similar package.

所以我下载了ncurses并通过以下方式安装了它:

wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.2.tar.gz
tar xvfz ncurses-6.2.tar.gz
cd ncurses-6.2
./configure --prefix=$HOME/.local/ncurses/6_2 --with-shared --with-pkg-config-libdir=$HOME/ncurses/6_2/lib/pkgconfig --enable-pc-files
make
make install

我创建了符号链接和PATH

cd ~/.local/bin
ls ../ncurses/6_2/bin/ | xargs -I {} ln -s ../ncurses/6_2/bin/{} {}
cd ~/.local/include
ls ../ncurses/6_2/include/ | xargs -I {} ln -s ../ncurses/6_2/include/{} {}
cd ~/.local/lib
ls ../ncurses/6_2/lib/ | xargs -I {} ln -s ../ncurses/6_2/lib/{} {}
cd ~/.local/lib/pkgconfig
ls ../../ncurses/6_2/lib/pkgconfig/ | xargs -I {} ln -s ../../ncurses/6_2/lib/pkgconfig/{} {}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.local/lib
export PKG_CONfig_PATH=$PKG_CONfig_PATH:$HOME/.local/lib/pkgconfig

我确实再次进行了配置,但是发生了相同的错误。我该怎么办?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)