Não é possível instalar o Ruby 2.2.0 usando o rbenv

0

Eu instalei rbenv do GitHub:

git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

Estou tentando instalar o Ruby 2.2.0:

sudo /home/vagrant/.rbenv/bin/rbenv install 2.2.0

Como posso corrigir isso?

Aqui estão as últimas linhas do log:

installing bundle gems:       /home/vagrant/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0 (build_info, cache, doc, extensions, gems, specifications)
/tmp/ruby-build.20150209193236.15392/ruby-2.2.0/lib/rubygems/core_ext/kernel_require.rb:54:in 'require': cannot load such file -- zlib (LoadError)
    from /tmp/ruby-build.20150209193236.15392/ruby-2.2.0/lib/rubygems/core_ext/kernel_require.rb:54:in 'require'
    from /tmp/ruby-build.20150209193236.15392/ruby-2.2.0/lib/rubygems/package.rb:46:in '<top (required)>'
    from /tmp/ruby-build.20150209193236.15392/ruby-2.2.0/lib/rubygems/core_ext/kernel_require.rb:54:in 'require'
    from /tmp/ruby-build.20150209193236.15392/ruby-2.2.0/lib/rubygems/core_ext/kernel_require.rb:54:in 'require'
    from /tmp/ruby-build.20150209193236.15392/ruby-2.2.0/lib/rubygems/dependency_installer.rb:3:in '<top (required)>'
    from /tmp/ruby-build.20150209193236.15392/ruby-2.2.0/lib/rubygems/core_ext/kernel_require.rb:54:in 'require'
    from /tmp/ruby-build.20150209193236.15392/ruby-2.2.0/lib/rubygems/core_ext/kernel_require.rb:54:in 'require'
    from /tmp/ruby-build.20150209193236.15392/ruby-2.2.0/lib/rubygems.rb:556:in 'install'
    from ./tool/rbinstall.rb:717:in 'block (2 levels) in <main>'
    from ./tool/rbinstall.rb:716:in 'each'
    from ./tool/rbinstall.rb:716:in 'block in <main>'
    from ./tool/rbinstall.rb:749:in 'call'
    from ./tool/rbinstall.rb:749:in 'block in <main>'
    from ./tool/rbinstall.rb:746:in 'each'
    from ./tool/rbinstall.rb:746:in '<main>'
make: *** [do-install-all] Error 1
    
por DmitryR 09.02.2015 / 20:52

1 resposta

3

Você não tem o zlib instalado. Para um ambiente de criação adequado, execute o seguinte:

Ubuntu / Debian:

apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

CentOS / Fedora:

yum install -y gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel

Para mais, leia o ruby-build wiki .

    
por 09.02.2015 / 21:06

Tags