3
votes

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 --without-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--host'. See `config.log' for more details
There has been an error while running configure. Halting the installation.

1
Looks like it's trying to cross-compile, what's the content of /Users/Keta/.rvm/src/ruby-1.9.3-p551 ?philant
@philant there are a lot of files and they are various type of files.Cheetah Felidae
Did give a look to config.log ?philant
Do you know what XCode is? You can try some of the suggestions here: stackoverflow.com/questions/19594719/…7stud

1 Answers

6
votes

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.)