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.
関連記事
-
-
Adobe Reader インストール
Adobe ReaderはLinux版も用意されています。以前はyumレポジトリに登録されていましたが、現在は外して(外されて?)しまったようです。なので、ダウンロードしてローカルインストールという流
-
-
FTPサーバ(vsftpd)を導入
vsftpd (Very Secure FTP deamon)の導入メモ vsftpをインストール yumでインストール # yum -y install vsftpd 手動起
-
-
yum実行が中断された場合の再開方法
yumコマンド実行中にサーバがダウンしたり、ネットワークトラブルなどで中断した場合、再起動後にyumを実行した際に以下のようなエラーメッセージで実行できません。 There are un
-
-
MySQL インストール
利用できるパッケージを確認 # yum list mysql ~ Available Packages mysql.i686
-
-
Ruby 1.9.x インストール
バージョン1.9をソースからコンパイルしてインストールのメモ # wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-1.9.3-p545.tar
-
-
Ubuntuバージョンを取得する
Ubuntuのバージョンはコマンド「lsb_release」を使用して確認することができます。 /etc/lsb-releaseを参照することでも同情報を取得できます。もしくは、/etc/os-re
-
-
Doxygenのインストールと設定
Doxygenのインストール yumリポジトリには古いバージョンのものしか登録されていません。ここでは最新版をダウンロードし、インストールしてみます。(最新版1.8.6) # ダウンロード
-
-
Google Chrome インストール
商用ディストリビューションであるRed Hatやそれの無償版であるCentOSで、Google Chromeはサポート対象から外されてしまったようです。 Google Says Red Hat
-
-
Timezoneの設定 (JSTに変更する)
JSTに変更する。 # cp -p /usr/share/zoneinfo/Japan /etc/localtime 確認 # date Mon Aug 25 00:2
-
-
ディレクトリの階層をツリー形式で表示「tree」コマンド
LinuxでもWindows同様に、ディレクトリ階層をツリー形式で表示してくれる「tree」コマンドが使用可能です。 インストール # yum install tree tree
- PREV
- Lightboxプラグイン「Boxer」
- NEXT
- パス定数と変更方法やURLの取得
Comment
Ruby 2.1.x ソースからコンパイルインストール
http://t.co/u0bXwPio6J