美文网首页
编译安装ruby

编译安装ruby

作者: 俊杰的笔记 | 来源:发表于2017-04-26 20:10 被阅读211次

    安装编译环境

    yum groupinstall "Development tools"
    或者

    yum install gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel

    删除已经安装的项目:

    yum erase ruby ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs

    安装依赖:

    yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel

    下载Ruby源码并解压缩:

    wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gztar zxvf ruby-2.1.5.tar.gz

    编译安装:

    cd ruby-2.1.5
    ./configure
    make
    make install

    检查安装:

    ruby -v

    相关文章

      网友评论

          本文标题:编译安装ruby

          本文链接:https://www.haomeiwen.com/subject/csswzttx.html