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ライブラリ

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

関連記事

no image

Doxygenのインストールと設定

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

no image

EPELレポジトリの追加

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

Adobe Reader インストール

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

MySQL インストール

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

no image

telnetサーバを導入

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

Ubuntuバージョンを取得する

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

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

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

REMIレポジトリの追加

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

Google Chrome インストール

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

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

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

Message

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

*

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

    PAGE TOP ↑