简体   繁体   中英

Trouble Installing Ruby on Mac OSX 10.6.8 Snow Leopard

I just installed Ruby Version Manager 1.10.2 and attempted to install Ruby 1.9.2 and I get the following error:

ayman-al-abdullahs-macbook:~ Terminal$ rvm install 1.9.2
Fetching yaml-0.1.4.tar.gz to /Users/Terminal/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/Terminal/.rvm/src
Configuring yaml in /Users/Terminal/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/Terminal/.rvm/usr"  ', please read      /Users/Terminal/.rvm/log/ruby-1.9.2-p290/yaml/configure.log
Compiling yaml in /Users/Terminal/.rvm/src/yaml-0.1.4.
Error running 'make ', please read /Users/Terminal/.rvm/log/ruby-1.9.2- p290/yaml/make.log


Database file /Users/Terminal/.rvm/config/packages does not exist.

Installing Ruby from source to: /Users/Terminal/.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 - #extracting ruby-1.9.2-p290 to /Users/Terminal/.rvm/src/ruby-1.9.2- p290
ruby-1.9.2-p290 - #extracted to /Users/Terminal/.rvm/src/ruby-1.9.2-p290
ruby-1.9.2-p290 - #configuring 
Error running ' ./configure --prefix=/Users/Terminal/.rvm/rubies/ruby-1.9.2-p290 -- enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/Terminal/.rvm/usr    ', please read /Users/Terminal/.rvm/log/ruby-1.9.2-p290/configure.log
There has been an error while running configure. Halting the installation.

I opened the .rvm/log/ruby-1.9.2-p290/configure.log I received the following error:

[2012-02-10 21:14:02]  ./configure --prefix=/Users/Terminal/.rvm/rubies/ruby-1.9.2-p290   --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/Terminal/.rvm/usr 
configure: WARNING: unrecognized options: --with-libyaml
checking build system type... i386-apple-darwin10.8.0
checking host system type... i386-apple-darwin10.8.0
checking target system type... i386-apple-darwin10.8.0
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/Terminal/.rvm/src/ruby-1.9.2-p290':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

I tried rm the file and reinstalling it, and I still get the same error.

Does anyone have any clue what this could be?

Thank you!

UPDATE UPDATE

Fixed it!

Downloading xcode from Apple requires you to be a developer ($99) or pay $5 for version 10.7 (which requires Lion).

I was able to procure an older version of XCode made specifically for Snow Leapard (4.0.2). After downloading, and installing Ruby version 1.9.3 it ran perfectly.

Thank you all for your help!

Let me know if anyone else runs into this same issue and I'll be happy to walk you through my terminal steps (saved the terminal log).

It seems you don't have gcc. Install Apple Developer Tools.

I fixed it!

Downloading xcode from Apple requires you to be a developer ($99) or pay $5 for version 10.7 (which requires Lion).

I was able to procure an older version of XCode made specifically for Snow Leapard (4.0.2). After downloading, and installing Ruby version 1.9.3 it ran perfectly.

Thank you all for your help!

Let me know if anyone else runs into this same issue and I'll be happy to walk you through my terminal steps (saved the terminal log).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM