LoginSignup
4

More than 5 years have passed since last update.

CentOS6にEmacs24をソースからインストールした

Last updated at Posted at 2015-09-16

謝辞

本記事を投稿するに当たって以下の記事を参考にさせて頂きました。

http://qiita.com/ironsand/items/fc755449b0e754ab1dd0
http://closeworld.exblog.jp/19273797/

経緯

CentOS6でEmacs環境を整えようと思ったらEmacs23だったので、MELPAの設定とかが面倒だった。だったらEmacs24を入れてしまえと、やってみたら結構すんなり入ったのでメモを残しておく。

準備

CentOS 6.7をミニマムインストールしてyum updateをかけておく。ついでにwgetもいれておく。
時間の節約のため、fastestmirrorで.jpを指定している。

# echo "include_only=.jp" >> /etc/yum/pluginconf.d/fastestmirror.conf
# yum update -y && yum upgrade -y
# yum install -y wget

以下、この状態でVirtualBox内で動作確認をしてある。

Emacs24の入手

Emacsのソースを入手する。執筆時の最新安定版は24.5。
http://gnu.org/s/emacs からミラーはJAISTを選んだ。

# mkdir ~/src && cd ~/src
# wget http://ftp.jaist.ac.jp/pub/GNU/emacs/emacs-24.5.tar.gz
# tar zxvf emacs-24.5.tar.gz

インストール

あとは大体この記事
http://qiita.com/ironsand/items/fc755449b0e754ab1dd0
の通りにインストールすればよいのだけど、./configure --without-xのとこで

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.

という風にコケてしまうので、yumでncurses-develを入れる。

という訳で実行するコマンドは以下。
(autoconfの入手先はJAISTに変えてある)

# yum groupinstall -y "Development Tools"
# wget http://ftp.jaist.ac.jp/pub/GNU/autoconf/autoconf-2.69.tar.gz
# tar zxvf autoconf-2.69.tar.gz
# cd autoconf-2.69
# ./configure ; make ; make install
# yum install -y texinfo libXpm-devel giflib-devel libtiff-devel libotf-devel ncurses-devel
# cd ~/src/emacs-24.5
# ./autogen.sh
# ./configure --without-x
# make bootstrap
# make install

(追記)
最後にバージョン確認をする。

$ emacs --version
GNU Emacs 24.5.1
Copyright (C) 2015 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

(追記ここまで)

以上。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4