【Xserver】emacsをコンパイル

XSERVER

xserver(エックスサーバ)には、デフォルトではemacs(イーマックス)がインスールされていない。コンパイルして利用できるようにする。

インストール

Emacsのダウンロード

以下のサイトからemacs-24.5.tar.gzをダウンロードする。

Index of /gnu/emacs

コンパイル

emacs-24.5.tar.gzを解凍して、 emacs-24.5 ディレクトに入りconfigureを実施する。インストールディレクトリは$HOME/.localとする。

./configure --prefix=$HOME/.local

以下のようなエラーが表示される。libncursesなどが足りないようである。

checking for library containing tputs... no
configure: error: The required function `tputs' was not found in any library.
The following libraries were tried (in order):
  libtinfo, libncurses, libterminfo, libtermcap, libcurses
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-5.9.tar.gzをダウンロードする。

Index of /gnu/ncurses

ncurses-5.9.tar.gz を展開して ncurses-5.9 ディレクトリ上でconfigure を行う。

./configure --prefix=$HOME/.local 

$HOME/.local は以下のように ncurses 関係のincludeやlibが出来上がる。

$ ls
 bin  include  lib  libexec  man  share  var

emacs-24.5 ディレクト上で、再度、./configure を行う。

 ./configure --prefix=$HOME/.local LDFLAGS=-L$HOME/.local/lib CPPFLAGS=-I$HOME/.local/include  --without-x
make
make install

$HOME/.local/bin にインストールされる。

[.local/bin]$ ls
captoinfo  ebrowse     emacsclient     infocmp          reset  toe
clear      emacs       etags           infotocap        tabs   tput
ctags      emacs-24.5  grep-changelog  ncurses5-config  tic    tset

$HOME/.bash_profileにパスを通して終了。

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:$HOME/.local/bin
スポンサーリンク
XSERVERその他
Engineerをフォローする
レンサバ