문제

I am trying to download ruby 1.9.3 (for learning purposes, this is the version in the book) When I run $rvm install 1.9.3 I get a configuration error:

Error running './configure --prefix=/Users/john/.rvm/rubies/ruby-1.9.3-p545 --with-opt-dir=/usr/local/Cellar/libyaml/0.1.6:/usr/local/Cellar/readline/6.3.3:/usr/local/Cellar/libksba/1.3.0:/usr/local/Cellar/openssl/1.0.1g --without-tcl --without-tk --disable-install-doc --enable-shared', showing last 15 lines of /Users/john/.rvm/log/1398181983_ruby-1.9.3-p545/configure.log

Then the last 15 lines are:

[2014-04-22 10:53:15] ./configure
current path: /Users/john/.rvm/src/ruby-1.9.3-p545
PATH=/usr/local/Cellar/pkg-config/0.28/bin:/usr/local/Cellar/libtool/2.4.2/bin:/usr/local/Cellar/automake/1.14.1/bin:/usr/local/Cellar/autoconf/2.69/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Users/john/.rvm/bin:/Users/john/.rvm/bin
command(7): ./configure --prefix=/Users/john/.rvm/rubies/ruby-1.9.3-p545 --with-opt-dir=/usr/local/Cellar/libyaml/0.1.6:/usr/local/Cellar/readline/6.3.3:/usr/local/Cellar/libksba/1.3.0:/usr/local/Cellar/openssl/1.0.1g --without-tcl --without-tk --disable-install-doc --enable-shared
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... i386-apple-darwin13.1.0
checking host system type... i386-apple-darwin13.1.0
checking target system type... i386-apple-darwin13.1.0
checking whether the C compiler works... no
configure: error: in `/Users/john/.rvm/src/ruby-1.9.3-p545':
configure: error: C compiler cannot create executables

Does anyone know what is wrong here? Since I'm new, I'm assuming it is something simple...

Thanks in advance!

도움이 되었습니까?

해결책

Issue is with the c compliers. You should be doing

sudo apt-get install clang && rvm install 1.9.3 --with-gcc=clang

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top