Ruby 2.1.x ソースからコンパイルインストール

Rubyをソースからインストールした際のメモです。(執筆時最新版 Ruby 2.1.2)
ダウンロードファイルのパスは以下を参照(過去分も含めて)
Ruby CDN

# cd /usr/local/src
# wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz
# tar xvzf ruby-2.1.2.tar.gz
# cd ruby-2.1.2

コンパイル/インストール

# ./configure
# make
# make install
# ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) 

必要なライブラリ

最下部にコンパイルエラーと依存ライブラリによるメッセージの抜粋をしていますが、以下対処としてライブラリの追加を行いました。Win32系は省いています。
導入後に"make clean"したあとにもう一度コンパイル/インストールを行って下さい。

コンパイルエラー

g++ (+ libstdc++-devel)
# yum install gcc-c++

依存ライブラリ

fiddle
# yum install libffi-devel
readline
# yum install readline readline-devel
tk/tkutil (libX11/zlib-devel含む)
# yum install tcl-devel tk-devel
openssl
# yum install openssl-devel
dbm gdbm
# yum install gdbm-devel
ripper
# yum install bison

fiddleライブラリ readlineライブラリ tkライブラリ


コンパイルエラー

compiling miniprelude.c
In file included from miniprelude.c:8:
vm_core.h:585: error: expected specifier-qualifier-list before ‘rb_atomic_t’
make: *** [miniprelude.o] Error 1

依存ライブラリ

Failed to configure -test-/win32/dln. It will not be installed.
Failed to configure -test-/win32/fd_setsize. It will not be installed.
Failed to configure dbm. It will not be installed.
ffi.h is missing. Please install libffi.
Failed to configure fiddle. It will not be installed.
Failed to configure gdbm. It will not be installed.
Failed to configure openssl. It will not be installed.
readline nor libedit not found
Failed to configure readline. It will not be installed.
Use ActiveTcl libraries (if available).
Search tclConfig.sh and tkConfig.sh...................
Fail to find [tclConfig.sh, tkConfig.sh]
Use X11 libraries (or use TK_XINCLUDES/TK_XLIBSW information on tkConfig.sh).
Warning:: cannot find X11 library. tcltklib will not be compiled (tcltklib is disabled on your Ruby. That is, Ruby/Tk will not work). Please check configure options. If your Tcl/Tk don't require X11, please try --without-X11.
Can't find X11 libraries. 
So, can't make tcltklib.so which is required by Ruby/Tk.
Failed to configure tk. It will not be installed.
Failed to configure tk/tkutil. It will not be installed.
Failed to configure win32. It will not be installed.
Failed to configure win32ole. It will not be installed.
  • このエントリーをはてなブックマークに追加

関連記事

no image

JDK 7 インストール

ダウンロード Java SE - Downloads | Oracle Technology Network | Oracle こちらから、JDK Downloadへすすみ、"Accept L

Adobe Reader インストール

Adobe ReaderはLinux版も用意されています。以前はyumレポジトリに登録されていましたが、現在は外して(外されて?)しまったようです。なので、ダウンロードしてローカルインストールという流

MySQL インストール

利用できるパッケージを確認 # yum list mysql ~ Available Packages mysql.i686

no image

日本語表示と入力

CentOSを簡易インストールでセットアップを行うと表示や入力が日本語で行えません。 ここでは、メニューの日本語化と日本語入力の設定方法を紹介します。 日本語関連のパッケージをインストール

ディレクトリの階層をツリー形式で表示「tree」コマンド

LinuxでもWindows同様に、ディレクトリ階層をツリー形式で表示してくれる「tree」コマンドが使用可能です。 インストール # yum install tree tree

Avast! Linux Home Editionをインストール

普段WindowsやMacに使用している「Avast AntiVirus」のLinuxバージョンがあるので試してみました。現在は、提供が終了されているためダウンロード、ローカルインストールという流れに

Ruby 2.xをUbuntuにインストール

Ubuntuでは「Stable Release Updates Policy」に基づいて最新版のパッケージの公開されておらず、公式のレポジトリではRuby 1.9.xまでが安定版として提供されています

Ruby 1.9.x インストール

バージョン1.9をソースからコンパイルしてインストールのメモ # wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-1.9.3-p545.tar

no image

EPELレポジトリの追加

EPELは、主にRedHat系であるRHEL, CentOS, Scientific Linux向けのオープンソースのパッケージが公開されているレポジトリです。 レポジトリ追加 パスを探す場合

no image

Timezoneの設定 (JSTに変更する)

JSTに変更する。 # cp -p /usr/share/zoneinfo/Japan /etc/localtime 確認 # date Mon Aug 25 00:2

Comment

Message

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

    PAGE TOP ↑