Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm running Mountain Lion, and I'm trying to install Ruby; however, I get "bad CPU in executable" error. Not sure how to fix this . . . ideas? Sorry for the bad formatting - "code" doesn't really format this Terminal output properly.

[06:51 AM] ~ 2 $ curl -L https://get.rvm.io | bash -s stable % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 185 100 185 0 0 293 0 --:--:-- --:--:-- --:--:-- 345 100 9979 100 9979 0 0 11662 0 --:--:-- --:--:-- --:--:-- 11662 bash: line 30: /sw/bin/gtar: Bad CPU type in executable Downloading RVM from wayneeseguin branch stable % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 125 100 125 0 0 502 0 --:--:-- --:--:-- --:--:-- 531 100 1045k 100 1045k 0 0 925k 0 0:00:01 0:00:01 --:--:-- 1543k bash: line 161: /sw/bin/gtar: Bad CPU type in executable

share|improve this question
    
Ruby already comes installed on OS X. –  Gerry Aug 12 '12 at 11:13
    
+1 on "Ruby already ... installed". On another note, the error is occurring with /sw/bin/gtar. Did you recently upgrade? Do you have an old fink distribution installed? The script you are running is finding gtar but the call fails. –  ephsmith Aug 12 '12 at 14:33
    
If you really want this to run, you might try exporting rvm_tar_command explicitly before you run the script--i.e. export rvm_tar_command=/usr/bin/tar. –  ephsmith Aug 12 '12 at 14:34
    
The Apple version is 1.8.something. The most recent ruby version is 1.9.2. So, that's why I want to use THAT version. I'll try that command when I get home - thanks. –  lolajl Aug 12 '12 at 15:37
1  
Okay . . . culprit was Fink. Easily removed with: sudo rm -rf /sw –  lolajl Aug 12 '12 at 18:55
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.