Ruby on rails 安装ruby1.9.2时出现问题

Ruby on rails 安装ruby1.9.2时出现问题,ruby-on-rails,ruby,linux,installation,Ruby On Rails,Ruby,Linux,Installation,我试图在我的Linux系统(Mint Linux发行版)上使用rvm安装ruby1.9.2,但由于一些无法调试的错误,我无法安装。这是我在运行install命令时遇到的错误 $ rvm install 1.9.2 Installing Ruby from source to: /home/nnn/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)... ruby-1.9.2-p290 - #fe

我试图在我的Linux系统(Mint Linux发行版)上使用rvm安装ruby1.9.2,但由于一些无法调试的错误,我无法安装。这是我在运行install命令时遇到的错误

$ rvm install 1.9.2
Installing Ruby from source to: /home/nnn/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...

ruby-1.9.2-p290 - #fetching 
ruby-1.9.2-p290 - #extracted to /home/nnn/.rvm/src/ruby-1.9.2-p290 (already extracted)
Fetching yaml-0.1.4.tar.gz to /home/nnn/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /home/nnn/.rvm/src
Configuring yaml in /home/nnn/.rvm/src/yaml-0.1.4.
Compiling yaml in /home/nnn/.rvm/src/yaml-0.1.4.
Installing yaml to /home/nnn/.rvm/usr

ruby-1.9.2-p290 - #configuring 
ERROR: Error running ' ./configure --prefix=/home/nnn/.rvm/rubies/ruby-1.9.2-p290 --enable-shared --disable-install-doc --with-libyaml-dir=/home/nnn/.rvm/usr ', 
please read /home/nnn/.rvm/log/ruby-1.9.2-p290/configure.log
ERROR: There has been an error while running configure. Halting the installation.
configure.log文件有以下错误

./configure --prefix=/home/nnn/.rvm/rubies/ruby-1.9.2-p290 --enable-shared --disable-install-doc --with-libyaml-dir=/home/nnn/.rvm/usr 
configure: WARNING: unrecognized options: --with-libyaml-dir
configure: error: could not determine MAJOR number from version.h
你能帮帮我吗

如果您跑步,谢谢

./configure --help
您将看到实际上没有“with libyaml dir”选项,Ruby的主配置脚本不支持该选项

这些“with xxx dir”参数通常在编译扩展时使用,您可以通过运行

ruby extconf.rb --with-libimportantforextension-dir=...
在您的情况下,解决方案是使用apt get安装libyaml:

sudo apt-get install libyaml
通过这种方式,RVM可能会识别出它已经安装,并且不会尝试下载并安装到自定义位置,因此您不会再收到当前出现的错误。

What“with xxx dir”语法来自何处?它是rubygems的一部分吗?