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

telnetサーバを導入

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

no image

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

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

no image

EPELレポジトリの追加

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

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

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

no image

Doxygenのインストールと設定

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

Google Chrome インストール

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

no image

FTPサーバ(vsftpd)を導入

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

Adobe Reader インストール

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

MySQL インストール

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

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

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

Message

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

*

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

    PAGE TOP ↑