Ruby 1.9.x インストール

バージョン1.9をソースからコンパイルしてインストールのメモ

[root@~]# wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-1.9.3-p545.tar.gz
[root@~]# tar xvzf ruby-1.9.3-p545.tar.gz
[root@~]# cd ruby-1.9.3-p545
[root@~]# ./configure 

コンパイル

[root@~]# make

インストール

[root@~]# make test
[root@~]# make install

簡単な確認

[root@~]# ruby -v
ruby 1.9.3p545 (2014-02-24) [i686-linux]
[root@~]# whereis ruby
ruby: /usr/local/bin/ruby /usr/local/lib/ruby

コンパイルエラー

以下、環境によると思いますが、コンパイルエラーがでました。それぞれ別途対処したいと思います。

configuring -test-/win32/dln
Failed to configure -test-/win32/dln. It will not be installed.

configuring -test-/win32/fd_setsize
Failed to configure -test-/win32/fd_setsize. It will not be installed.

configuring curses
Failed to configure curses. It will not be installed.

configuring dl/win32
Failed to configure dl/win32. It will not be installed.

configuring fiddle
ffi.h is missing. Please install libffi.
Failed to configure fiddle. It will not be installed.

configuring psych
yaml.h is missing. Please install libyaml.
Failed to configure psych. It will not be installed.

configuring readline
readline nor libedit not found
Failed to configure readline. It will not be installed.

check libraries....
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.

configuring tk/tkutil
Failed to configure tk/tkutil. It will not be installed.

configuring win32ole
Failed to configure win32ole. It will not be installed.

cursesライブラリ
readlineライブラリ

tkライブラリ

psychライブラリ
YAMLいうデータフォーマットを解析・出力するためのライブラリ
プログラマーのための YAML 入門 (初級編)

[root@localhost etc]# gem -v
/usr/local/lib/ruby/1.9.1/yaml.rb:84:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
1.8.23.2
[root@localhost etc]# ruby -rpsych -e 'p Psych.libyaml_version'
/usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- psych (LoadError)
        from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
[root@localhost etc]# gem install psych
/usr/local/lib/ruby/1.9.1/yaml.rb:84:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
Fetching: psych-2.0.5.gem (100%)
Building native extensions.  This could take a while...
Successfully installed psych-2.0.5
1 gem installed
Installing ri documentation for psych-2.0.5...
Installing RDoc documentation for psych-2.0.5...
[root@localhost etc]# ruby -rpsych -e 'p Psych.libyaml_version'
[0, 1, 6]
[root@localhost etc]# gem -v
1.8.23.2

fiddleライブラリ

  • このエントリーをはてなブックマークに追加

関連記事

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

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

REMIレポジトリの追加

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

no image

日本語表示と入力

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

no image

FTPサーバ(vsftpd)を導入

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

Google Chrome インストール

商用ディストリビューションであるRed Hatやそれの無償版であるCentOSで、Google Chromeはサポート対象から外されてしまったようです。 Google Says Red Hat

MySQL インストール

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

no image

Doxygenのインストールと設定

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

no image

telnetサーバを導入

telnetサーバのインストール # yum -y install telnet-server telnetサーバの設定 # vi /etc/xinetd.d/telnet

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

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

no image

JDK 7 インストール

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

Message

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

*

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

    PAGE TOP ↑