I apologize for my ignorance - I'm very new to this - but I have tried everything and cannot get 1.9.2 installed using RVM. I believe I have installed RVM correctly, and when I go to install 1.9.2 I get the following error in my make log when ruby tries to compile:
ld: in /usr/local/lib/libz.1.dylib, file was built for unsupported file format which is
not the architecture being linked (x86_64) for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [../../../.ext/x86_64-darwin10.6.0/digest/md5.bundle] Error 1
make: *** [mkmain.sh] Error 1
Some other information: I was running OS X in 32 bit, and received a similar error - replace the (x86_64) with I believe (i36). I am now running in 64 bit.
I have done everything TinMan has asked me to do, and still no avail - Just want to point out that I can install 1.8.7 just fine. Attempting to install 1.9.1 and 1.9.2 gives me the following error message:
`Installing Ruby from source to: /Users/tl/.rvm/rubies/ruby-1.9.2-p180, this may take a while depending on your cpu(s)...
ruby-1.9.2-p180 - #fetching
ruby-1.9.2-p180 - #downloading ruby-1.9.2-p180, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8609k 100 8609k 0 0 655k 0 0:00:13 0:00:13 --:--:-- 939k
ruby-1.9.2-p180 - #extracting ruby-1.9.2-p180 to /Users/tl/.rvm/src/ruby-1.9.2-p180
ruby-1.9.2-p180 - #extracted to /Users/tl/.rvm/src/ruby-1.9.2-p180
ruby-1.9.2-p180 - #configuring
ruby-1.9.2-p180 - #compiling
ERROR: Error running 'make ', please read /Users/tl/.rvm/log/ruby-1.9.2-p180/make.log
ERROR: There has been an error while running make. Halting the installation.`
Additionally, I have upgraded my autoconf, automake, m4, and libtools.
Lastly, my path and .bash_profiles respectively look like:
PATH
`/usr/local/upgraded/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin`
.bash
`export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"`
I updated my autoconf, automake, m4, and libtools following the instructions here: http://tom.meinlschmidt.org/2010/11/22/upgrade-autoconfautomake-in-osx/
RVM Info: `system:
system:
uname: "Darwin Tam-Les-MacBook-Pro.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:11:58 PST 2010; root:xnu-1504.9.26~3/RELEASE_X86_64 x86_64"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"
rvm:
version: "rvm 1.5.2 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/]"
homes:
gem: "not set"
ruby: "not set"
binaries:
ruby: "/usr/bin/ruby"
irb: "/usr/bin/irb"
gem: "/usr/bin/gem"
rake: "/usr/bin/rake"
environment:
PATH: "/usr/local/upgraded/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/opt/local/bin:/Users/tl/.rvm/bin:/Users/tl/.rvm/bin"
GEM_HOME: ""
GEM_PATH: ""
MY_RUBY_HOME: ""
IRBRC: ""
RUBYOPT: ""
gemset: ""`
Also, your PATH doesn't look like RVM has been allowed to initialize itself. When RVM has been initialized it will put its path to your ~/.rvm first.
How do you do that? I'm really new to this, and have gotten this far through sheer guess work. Inefficient I know.
Hi all - it's been a while since I've given up on this, but I am going to try again this weekend. Thanks for all the advice and I'll let you know what happens from there. For a newbie such as myself, I severely underestimated how difficult just installing something is.
I don't know if you're still on it, but i succeeded just by doing this ::
sudo rm /usr/local/lib/libz.*
:)
Probably some software has installed a wrong lib... Well wrong architecture
When you upgrade from 32bit to 64bit, all the Ruby binaries under RVM's control need to be recompiled. This means Ruby and gems with compiled C.
Here's a couple steps to try off the top of my head, having done this a while back:
rvm get head
. The current rev. of RVM is 1.5.1, having updated yesterday.rvm uninstall
with the version of Ruby, followed by rvm install
with the same version number. That should bring the Ruby versions to 64-bit.gem pristine -all
for each installed Ruby. You could probably do them all automatically using rvm ruby 'gem pristine --all'
.Edit:
[...] I was able to successfully install 1.8.7 but am still receiving the same error for 1.9.2. Is there something else I'm missing? Does the .bash_profile matter in this situation?
Try typing rvm notes
and follow the instructions for handling dependencies for Mac OS. You might be missing something that is causing the problem. If that doesn't help edit your original question with the text of the error message so we can see it.
[...] when it goes through the extraction phase it says: '#extracted to /Users/tl/.rvm/src/ruby-1.9.2-p180 (already extracted)'
Ah, been there. Do rm ~/.rvm/src/ruby-1.9.2-p180/*
to empty that directory. RVM downloads the tarball for a particular Ruby into the ~/.rvm/archive
dir, then extracts it to ~/.rvm/src
. If something goes wrong during the extract it might have only some of the files, which causes a failure during the configuration/make cycle.
Edit:
have upgraded my autoconf, automake, m4, and libtools
HOW did you install and upgrade them? Ruby on Mac OS requires Apple's headers and XCode.
Please add the output of rvm info
to your original question. It will have all sorts of environment info.
Also, your PATH doesn't look like RVM has been allowed to initialize itself. When RVM has been initialized it will put its path to your ~/.rvm
first.
Edit:
The output from rvm info
shows that RVM has not been initialized. It is installed, but that is not the same thing.
I think this is caused by a previous MacPorts installation. removing those symbols / whatelse by running
sudo rm /usr/local/lib/libz.*
fixed it for me
I gave up trying to install Ruby 1.9.3 using RVM on OS X 10.8, and used homebrew to do so. It worked like a charm -- installs ruby with one single command:
$ brew install ruby
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With