RVM,ruby 2.4.1 错误

RVM, ruby 2.4.1 bug

我正尝试在 Rails 项目上启动 Ruby。我正在阅读高级程序员创建的分步指南。我一开始就失败了。我用命令下载了 RVM:

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC 0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

然后我用了:

curl -sSL https://get.rvm.io | bash -s stable

然后我尝试使用:

curl -sSL https://get.rvm.io | bash -s stable --rails

事情是这样的:

$ curl -sSL https://get.rvm.io | bash -s stable --rails

Downloading https://github.com/rvm/rvm/archive/1.29.3.tar.gz Downloading https://github.com/rvm/rvm/releases/download/1.29.3/1.29.3.tar.gz.asc gpg: Signature made Sun Sep 10 22:59:21 2017 CEST gpg:
using RSA key E206C29FBF04FF17 gpg: Good signature from "Michal Papis (RVM signing) " [unknown] gpg: aka "Michal Papis " [unknown] gpg:
aka "[jpeg image of size 5015]" [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3 Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17 GPG verified '/usr/local/rvm/archives/rvm-1.29.3.tgz'

Upgrading the RVM installation in /usr/local/rvm/ Upgrade of RVM in /usr/local/rvm/ is complete.

Upgrade Notes:

  • No new notes to display.

Ruby enVironment Manager 1.29.3 (latest) (c) 2009-2017 Michal Papis, Piotr Kuczynski, Wayne E. Seguin

Searching for binary rubies, this might take some time. No binary rubies available for: kali/kali-rolling/x86_64/ruby-2.4.1. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for kali. Installing requirements for kali. Updating system. Installing required packages: zlib1g-dev, libyaml-dev, libsqlite3-dev, autoconf, libgdbm-dev, libncurses5-dev, automake, libtool, bison, pkg-config, libreadline6-dev, libssl-dev...... Error running 'requirements_debian_libs_install zlib1g-dev libyaml-dev libsqlite3-dev autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libreadline6-dev libssl-dev', please read /usr/local/rvm/log/1510333806_ruby-2.4.1/package_install_zlib1g-dev_libyaml-dev_libsqlite3-dev_autoconf_libgdbm-dev_libncurses5-dev_automake_libtool_bison_pkg-config_libreadline6-dev_libssl-dev.log Requirements installation failed with status: 100.

稍后当我尝试通过以下方式获取一些宝石时:

bundle install --path vendor/bundle

它显示有关 sqlite3 的错误。

使用这些命令安装缺少的库

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

然后尝试按照教程进行操作。

您也可以按照 this awesome tutorial from Digital Ocean 使用 Rbenv 在 rails 上安装 Ruby,以防您无法使用 RVM 设置 rails。