Error installing Ruby 1.9.2 through rvm OSX Lion 10.7.2 Xcode 4.2

I get the following error when trying to install 1.9.2 using rvm

/Users/craigspaeth/.rvm/scripts/functions/utility: line 152: date: command not found Installing yaml to /Users/craigspaeth/.rvm/usr /Users/craigspaeth/.rvm/scripts/functions/utility: line 152: date: command not found ERROR: Error running 'make install', please read /Users/craigspaeth/.rvm/log/ruby-1.9.2-p290/yaml/make.install.log 

And so yaml / configure.log

 [] make install Making install in include make[2]: Nothing to be done for `install-exec-am'. test -z "/Users/craigspaeth/.rvm/usr/include" || ../config/install-sh -c -d "/Users/craigspaeth/.rvm/usr/include" /usr/bin/install -c -m 644 yaml.h '/Users/craigspaeth/.rvm/usr/include/.' Making install in src test -z "/Users/craigspaeth/.rvm/usr/lib" || ../config/install-sh -c -d "/Users/craigspaeth/.rvm/usr/lib" /bin/sh ../libtool --mode=install /usr/bin/install -c libyaml.la '/Users/craigspaeth/.rvm/usr/lib' libtool: install: /usr/bin/install -c .libs/libyaml-0.2.dylib /Users/craigspaeth/.rvm/usr/lib/libyaml-0.2.dylib libtool: install: (cd /Users/craigspaeth/.rvm/usr/lib && { ln -s -f libyaml-0.2.dylib libyaml.dylib || { rm -f libyaml.dylib && ln -s libyaml-0.2.dylib libyaml.dylib; }; }) ../libtool: line 941: ln: command not found ../libtool: line 941: rm: command not found libtool: install: /usr/bin/install -c .libs/libyaml.lai /Users/craigspaeth/.rvm/usr/lib/libyaml.la libtool: install: /usr/bin/install -c .libs/libyaml.a /Users/craigspaeth/.rvm/usr/lib/libyaml.a libtool: install: chmod 644 /Users/craigspaeth/.rvm/usr/lib/libyaml.a ../libtool: line 941: chmod: command not found make[2]: *** [install-libLTLIBRARIES] Error 127 make[1]: *** [install-am] Error 2 make: *** [install-recursive] Error 1 

I'm on OSX lion 10.7.2 with Xcode 4.2. I tried adding export CC=/usr/bin/gcc-4.2 to my bash_profile file, but that did not help.

Anyone else come across this? I am going to go completely bald, pulling my hair out for this.

EDIT: Stupid to me, I did not have gcc standalone installed? In any case, I get new errors above.

+2
source share
5 answers

This bug was fixed in 1.9.2-head ... so just

 rvm install 1.9.2-head && rvm use 1.9.2-head --default 

I find that 1.9.3 is incompatible with the large number of libraries that I use. This works with Xcode 4.2.

+1
source

With a clean installation of xcode 4.2, you can install ruby ​​1.9.2 through rvm, although it is not supported and can cause problems with some native stones using this command:

 rvm install 1.9.2 -C --with-gcc=clang 

This has been noted in the rvm problem list:

https://github.com/wayneeseguin/rvm/issues/610

+2
source

I just started installing rvm for the first time, which worked. It pops up a warning about ruby ​​1.9.2, so I built and installed 1.9.3 using (I'm on 10.7.2, with Xcode 4.2)

 rvm install 1.9.3 && rvm use 1.9.3 --default 

Worked great. But the hero does not yet have cedar support at 1.9.3 (or at least they do not claim to be), so I really wanted to launch 1.9.2. So I tried:

 rvm install 1.9.2 && rvm use 1.9.2 --default 

And it also worked ... So I'm not sure what happened β€œright” here. I have Xcode 4.2 installed in the default location, but I also have Xcode 4.1 installed in "Developer4.1". I installed 4.2 after I renamed my installation of 4.1. Hope this helps someone.

  ruby-1.9.2-p290 - #extracting ruby-1.9.2-p290 to /Users/tandersen/.rvm/src/ruby-1.9.2-p290 ruby-1.9.2-p290 - #extracted to /Users/tandersen/.rvm/src/ruby-1.9.2-p290 Fetching yaml-0.1.4.tar.gz to /Users/tandersen/.rvm/archives Extracting yaml-0.1.4.tar.gz to /Users/tandersen/.rvm/src Configuring yaml in /Users/tandersen/.rvm/src/yaml-0.1.4. Compiling yaml in /Users/tandersen/.rvm/src/yaml-0.1.4. Installing yaml to /Users/tandersen/.rvm/usr ruby-1.9.2-p290 - #configuring ruby-1.9.2-p290 - #compiling ruby-1.9.2-p290 - #installing Removing old Rubygems files... Installing rubygems-1.8.10 for ruby-1.9.2-p290 ... Installation of rubygems completed successfully. ruby-1.9.2-p290 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake). ruby-1.9.2-p290 - #importing default gemsets (/Users/tandersen/.rvm/gemsets/) Install of ruby-1.9.2-p290 - #complete Using /Users/tandersen/.rvm/gems/ruby-1.9.2-p290 Snow-Pro:~ tandersen$ Snow-Pro:~ tandersen$ irb ruby-1.9.2-p290 :001 > x = 3 => 3 ruby-1.9.2-p290 :002 > x*x => 9 
0
source

If you are doing a clean install of xcode 4.2, this will not work. For those who indicate that they get 4.2 to work, I would suggest that they install 4.2 on top of 4.1, which, according to the documentation for apples, will only install unix tools once. So make sure you know what is already installed on your system.

UPDATE for you

March 21

I installed and tested the following

  • Download and install xCode 4.3.2
  • Download and install command-line tools for Xcode in late March 2012.
  • Set the path xcode $ xcode-select -switch / Application / xcode.app / Content / Developer
  • Install Homebrew and then install git, autoconf, automake, libyaml, libksba, wget via Brew.
  • Install RVM, make sure it is configured in your shell
  • rvm install ruby-1.9.3-p125

There are articles recommending this for ruby> = 1.9.3, and everything that I tested and currently use. I installed and used mysql2, sqlite and the usual suspect (GEM). They all compiled and passed some of my core tests.

Hope this helps.

0
source

Do not use Xcode 4.2. Currently, there are problems with the creation of manuals for rubies and native gems, as well as assemblies of Homebrew and MacPort. This is due to the transition to LLVm, which made Apple. This is a compiler problem, not a RVM problem. Please use at most Xcode 4.1 plus any patches that Apple has provided for the 4.1 series.

-1
source

Source: https://habr.com/ru/post/905042/


All Articles