I'm desparate, fuddling with the following problem for two(!!) days now w/o a solution.
After an update to Lion I wanted to install additional rubies using the most recent version of rvm.
Here's what happens when I call bundler afterwards:
/Users/felix/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/Users/janroesner/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.1.0/digest/sha1.bundle, 9): Symbol not found: _SHA1_Init (LoadError)
Ok, openssl problem. So I checked there is no openssl but the system one in /usr with libraries in /usr/lib and headers in /usr/include/openssl. Check.
I decided to install a more recent version with brew. After that no ruby compiles with the error that BN_rand_range and BN_peudo_rand_range are defined already.
Seems to be more strict type checking of the most recent gcc, so I uncommented lines 411 and 412 in /usr/include/openssl/bn.h that caused the conflict cause ruby defines both on it's own. Now ruby compiles but I receive the same error Symbol not found: _SHA1_Init.
So I removed the comments from the openssl header file bn.h I put there before and tried the opposite. I commented these lines out in ~/.rvm/src/ruby-1.9.2-p290/ext/openssl/openssl_missing.h
Same result.
After that I completely removed ~/.rvm, reinstalled it and ... have the same problem.
Now I tried:
rvm pkg install openssl
rvm remove 1.9.2-p290
rvm install 1.9.2-p290 -C --with-openssl-dir=$rvm_path/usr
Same result.
I'm desparate. Can anyone help? Regards Felix
For anyone who should ever have this problem on Lion ... it's some Problem with duplicate headers that come from openssl. You can simply install openssl locally and tell rvm to use that local openssl version.
You can compile opnessl by hand with the prefix /usr/local or simply let rvm do the job:
rvm pkg install openssl
And then tell rvm to link against that version during ruby install:
rvm install 1.9.2 --with-openssl-dir=/path/to/your/home/.rvm/usr
In case you already have a local installation replace with:
rvm install 1.9.2 --with-openssl-dir=/usr/local
DO NOT try what can be read often:
rvm install 1.9.2 -C --with-openssl-dir=/path/to/your/home/.rvm/usr
That does not work.
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