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

Doxygenのインストールと設定

Doxygenのインストール yumリポジトリには古いバージョンのものしか登録されていません。ここでは最新版をダウンロードし、インストールしてみます。(最新版1.8.6) # ダウンロード

yum実行が中断された場合の再開方法

yumコマンド実行中にサーバがダウンしたり、ネットワークトラブルなどで中断した場合、再起動後にyumを実行した際に以下のようなエラーメッセージで実行できません。 There are un

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

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

REMIレポジトリの追加

RemiのサイトLes RPM de Remi - Repositoryよりリンクを取得 今回の対象はCentOS 6.5のためrelease-6とします。 # rpm -Uvh http

no image

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

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

Ubuntuバージョンを取得する

Ubuntuのバージョンはコマンド「lsb_release」を使用して確認することができます。 /etc/lsb-releaseを参照することでも同情報を取得できます。もしくは、/etc/os-re

no image

EPELレポジトリの追加

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

no image

FTPサーバ(vsftpd)を導入

vsftpd (Very Secure FTP deamon)の導入メモ vsftpをインストール yumでインストール # yum -y install vsftpd 手動起

Ruby 1.9.x インストール

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

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

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

Comment

@ymat_nc へ返信する コメントをキャンセル

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

*

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

    PAGE TOP ↑