Having problems installing ruby 1.9.3

I installed ruby 1.9.3 by the command rvm install 1.9.3 on mac's terminal. I got these errors (see below) after I installation. Does anybody have any ideas to solve this?

Error running './configure --prefix=/Users/Keta/.rvm/rubies/ruby-1.9.3-p551 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --without-tk --disable-install-doc --enable-shared', showing last 15 lines of /Users/Keta/.rvm/log/1421301212_ruby-1.9.3-p551/configure.log GEM_HOME=/Users/Keta/.rvm/gems/ruby-2.2.0 PATH=/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/Keta/.rvm/gems/ruby-2.2.0/bin:/Users/Keta/.rvm/gems/ruby-2.2.0@global/bin:/Users/Keta/.rvm/rubies/ruby-2.2.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/Users/Keta/.rvm/bin GEM_PATH=/Users/Keta/.rvm/gems/ruby-2.2.0:/Users/Keta/.rvm/gems/ruby-2.2.0@global command(7): ./configure --prefix=/Users/Keta/.rvm/rubies/ruby-1.9.3-p551 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --witho ut-tk --disable-install-doc --enable-shared configure: WARNING: unrecognized options: --without-tcl, --without-tk checking build system type... x86_64-apple-darwin14.0.0 checking host system type... x86_64-apple-darwin14.0.0 checking target system type... x86_64-apple-darwin14.0.0 checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... configure: error: in /Users/Keta/.rvm/src/ruby-1.9.3-p551': configure: error: cannot run C compiled programs. If you meant to cross compile, use /Users/Keta/.rvm/src/ruby-1.9.3-p551': configure: error: cannot run C compiled programs. If you meant to cross compile, use --host'. See `config.log' for more details
There has been an error while running configure. Halting the installation.


This cleared for me after I ran xcode-select --install . Prior to that I also ran rvm get head which may have contributed (but didn't fix the problem by itself.)

链接地址: http://www.djcxy.com/p/59212.html

上一篇: 为什么Perl的tr / \ n //会随着行长的增加而变得越来越慢?

下一篇: 安装ruby 1.9.3时遇到问题