`
MauerSu
  • 浏览: 521814 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

Install Ruby 1.9.3 with libyaml on CentOS

 
阅读更多
源:http://www.cnblogs.com/qq78292959/archive/2011/12/15/2288567.html
评:,其一就是安装ruby和rubygem,为了方便起见这里推荐安装ruby 1.9.2及之后的版本,这些版本已经包含了rubygem,无需单独安装,
Ruby 1.9.3-p0 makes psych—the replacement for 1.8.7’s YAML library, Syck—the default YAML parser. Psych is a wrapper around libyaml, so you’re going to need it installed and configured before installing Ruby.

If you install 1.9.3-p0 without libyaml, you’ll see warnings like this:

It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby.

Installing libyaml

$ wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
$ tar xzvf yaml-0.1.4.tar.gz
$ cd yaml-0.1.4
$ ./configure --prefix=/usr/local
$ make
$ make install

Quick review of what’s going on: download and untar the source code, change to the directory and install the package. You may need to sudo the make install command. Your mileage may vary.
Installing Ruby 1.9.3-p0
复制代码

$ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
$ tar xzvf ruby-1.9.3-p0.tar.gz
$ cd ruby-1.9.3-p0
$ ./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib
$ make
$ make install

复制代码

After installing, you can verify that Ruby was installed with ruby -v. It’s also worth trying gem --version to make sure you don’t get any errors regarding psych.

I tried installing libyaml-devel and libyaml from Yum, but couldn’t get ruby installed and recognizing those packages. Out of frustration, I turned to installing libyaml by source and it Just Worked™



CentOS 6下安装ruby 1.9

    博客分类:
    ruby


安装libyaml
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar xzvf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=/usr/local
make
make install

如果不安装libyaml,运行gem会出现:“It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby”警告。


安装ruby
tar -zxf ruby-1.9.3-p448.tar.gz
cd ruby-1.9.3-p448

./configure --enable-shared --disable-install-doc
make
make install

   可以从下面两个地址下载ruby1.9:

    http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/
    http://mirrors.ibiblio.org/ruby/1.9/

参考文章:

Install Ruby 1.9.3 with libyaml on CentOS(转)

Install Ruby 1.9 in CentOS 6



--end
分享到:
评论

相关推荐

    ruby-1.9.3-rpm:Ruby 1.9.3的RPM规范

    如何安装RHEL / CentOS 5/6 yum install -y rpm-build rpmdevtools readline-devel ncurses-devel gdbm-devel tcl-devel openssl-devel db4-devel byacc libyaml-devel libffi-devel makerpmdev-setuptreecd ~/...

    cli:Forj命令行界面

    福里克利安装Forj cli支持Ruby 1.9.3或更高...apt-get -y update$ sudo apt-get install ruby1.9.3 ruby1.9.3-dev rubygems1.9.3 build-essential libopenssl-ruby1.9.3 libssl-dev zlib1g-dev libxml2-dev libxslt-de

    centos安装GITLAB

    在CentOS上安装GitLab的过程中,可能会遇到一个与Ruby版本相关的错误:“EC_GROUP_new_curve_GF2m”。这个错误通常出现在尝试安装Ruby 1.9.3-p0时,由于其与OpenSSL库的兼容性问题导致。Ruby是GitLab运行所必需的...

    ruby离线安装所需所有的gem文件(另有安装包)

    提供的`rubyinstaller-1.9.3-p194.exe`应该是Ruby 1.9.3的安装程序,这个版本虽然相对较老,但在某些项目中可能仍然是必要的。在执行安装过程中,用户可以选择自定义安装路径,并决定是否在系统路径中添加Ruby,以...

    centos 6下安装innodb_ruby

    在 CentOS 6 上安装 `innodb_ruby` 需要一些步骤,因为该系统默认的 Ruby 版本可能低于 `innodb_ruby` 的需求。`innodb_ruby` 是一个由 Jeremy Cole 开发的 Ruby 库,专门用于解析 InnoDB 文件格式,帮助开发者深入...

    toran-cookbook:使用 Opscode Chef 安装配置 Toran 代理

    toran-食谱托兰代理速度和可靠性的 Composer 代理-- 要求厨师>= 11.6.0 Ruby>= 1.9.3平台阿帕奇nginx Debian X CentOS测试$ vagrant plugin install vagrant-omnibus$ vagrant plugin install vagrant-berkshelf$ ...

    安装文档1

    在IT行业中,构建一个开发环境是每个程序员的必备技能,特别是对于使用Ruby on Rails框架的开发者来说。本篇文档详细介绍了在不同的操作系统环境下,如何正确安装Ruby、Rails及其依赖环境。 首先,对于操作系统的...

    chef-cmake:cmake的厨师食谱

    厨师-cmake 描述 安装 ,一个跨平台的开源构建系统。 要求 支持的平台 本说明书支持以下平台,这意味着食谱应该在这些平台上运行而不会出错... default [ "cmake" ] [ "install_method" ] = "package" # `package` or `

Global site tag (gtag.js) - Google Analytics