I'm trying to install RVM on my Snow Leopard 10.6.8, using this:
\curl -L https://get.rvm.io | bash -s stable --ruby
And I get this error:
Installing Ruby from source to: /Users/Villa/.rvm/rubies/ruby-2.0.0-p0, this may take a while depending on your cpu(s)...
ruby-2.0.0-p0 - #downloading ruby-2.0.0-p0, this may take a while depending on your connection...
ruby-2.0.0-p0 - #extracted to /Users/Villa/.rvm/src/ruby-2.0.0-p0 (already extracted)
ruby-2.0.0-p0 - #configuring
ruby-2.0.0-p0 - #compiling
Error running 'make -j2', please read /Users/Villa/.rvm/log/ruby-2.0.0-p0/make.log
There has been an error while running make. Halting the installation.
And the make.log errors begins here:
In file included from openssl_missing.c:22:
openssl_missing.h:71: error: conflicting types for ‘HMAC_CTX_copy’
/Users/Villa/.rvm/usr/include/openssl/hmac.h:102: error: previous declaration of ‘HMAC_CTX_copy’ was here
openssl_missing.h:95: error: conflicting types for ‘EVP_CIPHER_CTX_copy’
/Users/Villa/.rvm/usr/include/openssl/evp.h:503: error: previous declaration of ‘EVP_CIPHER_CTX_copy’ was here
openssl_missing.c:27: error: conflicting types for ‘HMAC_CTX_copy’
/Users/Villa/.rvm/usr/include/openssl/hmac.h:102: error: previous declaration of ‘HMAC_CTX_copy’ was here
openssl_missing.c:122: error: conflicting types for ‘EVP_CIPHER_CTX_copy’
/Users/Villa/.rvm/usr/include/openssl/evp.h:503: error: previous declaration of ‘EVP_CIPHER_CTX_copy’ was here
make[2]: *** [openssl_missing.o] Error 1
make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
compiling psych_emitter.c
compiling psych_parser.c
compiling psych_to_ruby.c
compiling psych_yaml_tree.c
linking shared-object psych.bundle
installing default psych libraries
make: *** [build-ext] Error 2
Please tell me everything you need from me to get a solution
UPDATE #1
I try to install it doing:
rvm reinstall 1.9.3 --with-openssl-dir=/usr/bin
And I get this
Error running '__rvm_rm_rf /Users/Villa/.rvm/src/ruby-1.9.3-p392',
please read /Users/Villa/.rvm/log/ruby-1.9.3-p392/remove.src.log
/Users/Villa/.rvm/rubies/ruby-1.9.3-p392 has already been removed.
Installing requirements for osx/10.6/i386, might require sudo password
Skipping `brew update` make sure your formulas are up to date.
-bash: /usr/local/etc/openssl/cert.pem: Permission denied
-bash: /usr/local/etc/openssl/cert.pem: Permission denied
Doing /usr/local/etc/openssl
cert.pem => 77ee3751.0
Installing Ruby from source to: /Users/Villa/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)...
ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection...
ruby-1.9.3-p392 - #extracted to /Users/Villa/.rvm/src/ruby-1.9.3-p392 (already extracted)
ruby-1.9.3-p392 - #configuring...
Error running './configure --prefix=/Users/Villa/.rvm/rubies/ruby-1.9.3-p392 --with- openssl-dir=/usr/bin --with-opt- dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libxml2:/usr/local/opt/lib xslt:/usr/local/opt/libksba:/usr/local/opt/openssl:/usr/local/opt/sqlite --disable- install-doc --without-tcl --without-tk --enable-shared',
please read /Users/Villa/.rvm/log/ruby-1.9.3-p392/configure.log
There has been an error while running configure. Halting the installation.
Thanks!
Try installing with --with-openssl-dir=/path/to/openssl with the location of your installed openssl version.
more over you can look at this https://rvm.io/packages/openssl/
I got mine to work with the following code I found on MacRuby's site:
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
If you're using an Xcode version later than 4.3 this will configure the path for installations.
Related
I have a new OS 10.10.5 installed on my Mac which has a default ruby-2.0.0p481. However, I need ruby-1.9.3-p551 for specific reasons of our system. When I am trying to install ruby-1.9.3-p551 using RVM 1.26.11, I am getting the following error.
Error for rvm install 1.9.3
I also tried running "rvm install 1.9.3 --with-gcc=clang", but that too gave me an error as under.
Error for rvm install 1.9.3 --with-gcc=clang
I tried for searching ruby-1.9.3-p551.tar.bz2 binary file on mirror binaries and at other places but even that did not worked for me. Any help or pointers will be great.
Thank You :)
I tried "rvm get master" and the output is as under.
aparmar-mbpr:~ aparmar$ rvm get master
Downloading https://get.rvm.io
No GPG software exists to validate rvm-installer, skipping.
Downloading https://github.com/rvm/rvm/archive/master.tar.gz
Upgrading the RVM installation in /Users/aparmar/.rvm/
RVM PATH line found in /Users/aparmar/.mkshrc /Users/aparmar/.profile /Users/aparmar/.bashrc /Users/aparmar/.zshrc.
RVM sourcing line found in /Users/aparmar/.profile /Users/aparmar/.bash_profile /Users/aparmar/.zlogin.
Upgrade of RVM in /Users/aparmar/.rvm/ is complete.
# Ashish.Parmar,
#
# Thank you for using RVM!
# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.
In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
Upgrade Notes:
* No new notes to display.
RVM reloaded!
aparmar-mbpr:~
After this I did rvm reinstall 1.9.3 and I got the same previous error
aparmar-mbpr:~ aparmar$ rvm reinstall 1.9.3
ruby-1.9.3-p551 - #removing src/ruby-1.9.3-p551..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.10/x86_64/ruby-1.9.3-p551.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/aparmar/.rvm/rubies/ruby-1.9.3-p551, this may take a while depending on your cpu(s)...
ruby-1.9.3-p551 - #downloading ruby-1.9.3-p551, this may take a while depending on your connection...
ruby-1.9.3-p551 - #extracting ruby-1.9.3-p551 to /Users/aparmar/.rvm/src/ruby-1.9.3-p551....
ruby-1.9.3-p551 - #applying patch /Users/aparmar/.rvm/patches/ruby/GH-488.patch.
ruby-1.9.3-p551 - #applying patch /Users/aparmar/.rvm/patches/ruby/1.9.3/CVE-2015-1855-p484.patch.
ruby-1.9.3-p551 - #configuring...............................................
ruby-1.9.3-p551 - #post-configuration.
ruby-1.9.3-p551 - #compiling...........................................................................................................................................|
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/aparmar/.rvm/log/1448483473_ruby-1.9.3-p551/make.log
ossl_str_adjust(str, p);
^
ruby_missing.h:32:14: error: 'struct RString' has no member named 'len'
RSTRING(str)->len = (length); \
^
ossl.h:137:5: note: in expansion of macro 'rb_str_set_len'
rb_str_set_len((str), newlen);\
^
ossl_asn1.c:1336:5: note: in expansion of macro 'ossl_str_adjust'
ossl_str_adjust(str, p);
^
make[2]: *** [ossl_asn1.o] Error 1
make[1]: *** [ext/openssl/all] Error 2
make: *** [build-ext] Error 2
++ return 2
There has been an error while running make. Halting the installation.
aparmar-mbpr:~ aparmar$
I also tried rvm get head, but after that in the installation of 1.9.3 again I get the same above error
I'm on Windows and I currently have Ruby v2.1.5 as that is what came with RailsInstaller. However, I need to downgrade to 2.1.1 for another project and I'm not sure how to.
I have installed rvm on Cygwin and I'm getting these problems when trying to execute rvm install 2.1.1
Searching for binary rubies, this might take some time.
No binary rubies available for: cygwin/unknown/x86_64/ruby-2.1.1.
Continuing with compilation. Please read 'rvm help mount' to get more
information on binary rubies.
and
Checking requirements for cygwin.
Installing requirements for cygwin.
Updating system.
Installing required packages: mingw64-i686-gcc, mingw64-x86_64-gcc.
Requirements installation successful.
Installing Ruby from source to: /home/K/.rvm/rubies/ruby-2.1.1, this may take a while depending on your cpu(s)...
ruby-2.1.1 - #downloading ruby-2.1.1, this may take a while depending on your connection...
ruby-2.1.1 - #extracting ruby-2.1.1 to /home/K/.rvm/src/ruby-2.1.1....
ruby-2.1.1 - #applying patch /home/K/.rvm/patches/ruby/2.1.1/libyaml.patch.
ruby-2.1.1 - #applying patch /home/K/.rvm/patches/ruby/changeset_r45225.diff.
ruby-2.1.1 - #applying patch /home/K/.rvm/patches/ruby/changeset_r45240.diff.
ruby-2.1.1 - #configuring....................................................
ruby-2.1.1 - #post-configuration..
ruby-2.1.1 - #compiling....................................................
Error running '__rvm_make -j4',
showing last 15 lines of /home/K/.rvm/log/1433355357_ruby-2.1.1/make.log
make[2]: Leaving directory '/home/K/.rvm/src/ruby-2.1.1/ext/-test-/printf'
exts.mk:109: recipe for target 'ext/-test-/printf/all' failed
make[1]: *** [ext/-test-/printf/all] Error 2
make[1]: *** Waiting for unfinished jobs....
installing default rational libraries
installing default recursion libraries
make[2]: Leaving directory '/home/K/.rvm/src/ruby-2.1.1/ext/-test-/postponed_job'
linking shared-object -test-/rational.so
linking shared-object -test-/recursion.so
make[2]: Leaving directory '/home/K/.rvm/src/ruby-2.1.1/ext/-test-/recursion'
make[2]: Leaving directory '/home/K/.rvm/src/ruby-2.1.1/ext/-test-/rational'
make[1]: Leaving directory '/home/K/.rvm/src/ruby-2.1.1'
uncommon.mk:180: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2
++ return 2
There has been an error while running make. Halting the installation.
Any help would be appreciated. Thanks
You need to patch ruby soure code so it would compile on cygwin. Thankfully rvm supports patches out of the box!
Create a file called cygwin.patch with the following content:
--- /ext/-test-/printf/printf.c 2014-06-29 10:17:20.000000000 -0700
+++ /ext/-test-/printf/printf.c 2015-07-08 16:58:15.882479100 -0700
## -1,3 +1,4 ##
+#define __STRICT_ANSI__ /* avoid conflicting utoa */
#include <ruby.h>
#include <ruby/encoding.h>
And now simply execute rvm with a --patch parameter like shown below:
rvm install 2.2-head --patch cygwin.patch
I'm having trouble installing Ruby with RVM, and this one has me stumped. I'm running on OS Mavericks, with the latest XCode and xcode command line tools. I have a (to my knowledge) identical set up on another machine with no problems.
RVM appeared to install with no problems.
Upon an attempt to rvm install 2.1, I received the following error message:
ruby-2.1.1 - #removing src/ruby-2.1.1..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-2.1.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/user/.rvm/rubies/ruby-2.1.1, this may take a while depending on your cpu(s)...
ruby-2.1.1 - #downloading ruby-2.1.1, this may take a while depending on your connection...
ruby-2.1.1 - #extracting ruby-2.1.1 to /Users/user/.rvm/src/ruby-2.1.1...
ruby-2.1.1 - #applying patch /Users/user/.rvm/patches/ruby/changeset_r45225.diff.
ruby-2.1.1 - #applying patch /Users/user/.rvm/patches/ruby/changeset_r45240.diff.
ruby-2.1.1 - #configuring.
Error running './configure --prefix=/Users/user/.rvm/rubies/ruby-2.1.1 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --enable-shared',
showing last 15 lines of /Users/user/.rvm/log/1394918736_ruby-2.1.1/configure.log
[2014-03-15 21:25:55] ./configure
current path: /Users/user/.rvm/src/ruby-2.1.1
PATH=/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/user/.rvm/bin
command(4): ./configure --prefix=/Users/user/.rvm/rubies/ruby-2.1.1 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --enable-shared
checking build system type... x86_64-apple-darwin13.1.0
checking host system type... x86_64-apple-darwin13.1.0
checking target system type... x86_64-apple-darwin13.1.0
<stdin>:2:3: error: #error premature clang
#error premature clang
^
1 error generated.
configure: error: clang version 3.0 or later is required
There has been an error while running configure. Halting the installation.
My first thought was to run RVM requirements, which resulted in another error message
Checking requirements for osx.
Installing requirements for osx.
Updating system....
Installing required packages: gcc46.....
Error running 'requirements_osx_brew_libs_install gcc46',
showing last 15 lines of /Users/user/.rvm/log/1394919146/package_install_gcc46.log
+ case "$1" in
+ [[ -t 1 ]]
+ return 1
+ printf %b 'There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation\n'
There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation
+ case "$_system_version" in
+ return 1
Requirements installation failed with status: 1.
I followed the advice here, and have spent hours now looking online, but no solution yet has worked for me. Any thoughts and ideas are most welcome - this one has me stumped.
Once you have gcc46 insall you need to set it as the default compiler. You can find information on different ways to do that here: Setting GCC 4.2 as the default compiler on Mac OS X Leopard
Then as that output says, use brew tap --repair and brew doctor which gives you more info.
Here is what I did:
$ rvm install ruby-1.8.7-p352
Installing Ruby from source to: /Users/me/.rvm/rubies/ruby-1.8.7-p352, this may take a while depending on your cpu(s)...
ruby-1.8.7-p352 - #fetching
ruby-1.8.7-p352 - #extracted to /Users/me/.rvm/src/ruby-1.8.7-p352 (already extracted)
Applying patch 'stdout-rouge-fix' (located at /Users/me/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch)
ERROR: Error running 'patch -F25 -p1 -f <"/Users/me/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch"', please read /Users/me/.rvm/log/ruby-1.8.7-p352/patch.apply.stdout-rouge-fix.log
Applying patch 'no_sslv2' (located at /Users/me/.rvm/patches/ruby/1.8.7/no_sslv2.diff)
ruby-1.8.7-p352 - #configuring
ruby-1.8.7-p352 - #compiling
ERROR: Error running 'make ', please read /Users/me/.rvm/log/ruby-1.8.7-p352/make.log
ERROR: There has been an error while running make. Halting the installation.
Here is the contents of the first error log, patch.apply.stdout-rouge-fix.log:
[2012-02-02 14:08:02] patch -F25 -p1 -f <"/Users/me/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch"
patching file lib/mkmf.rb
Hunk #1 FAILED at 201.
1 out of 1 hunk FAILED -- saving rejects to file lib/mkmf.rb.rej
And then the last few lines from make.log
compiling readline
/usr/bin/gcc-4.2 -I. -I../.. -I../../. -I../.././ext/readline -DHAVE_READLINE_READLINE_H -DHAVE_READLINE_HISTORY_H -DHAVE_RL_FILENAME_COMPLETION_FUNCTION -DHAVE_RL_COMPLETION_MATCHES -DHAVE_RL_DEPREP_TERM_FUNCTION -DHAVE_RL_COMPLETION_APPEND_CHARACTER -DHAVE_RL_BASIC_WORD_BREAK_CHARACTERS -DHAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS -DHAVE_RL_BASIC_QUOTE_CHARACTERS -DHAVE_RL_COMPLETER_QUOTE_CHARACTERS -DHAVE_RL_FILENAME_QUOTE_CHARACTERS -DHAVE_RL_ATTEMPTED_COMPLETION_OVER -DHAVE_RL_LIBRARY_VERSION -DHAVE_RL_EVENT_HOOK -DHAVE_RL_CLEANUP_AFTER_SIGNAL -DHAVE_REPLACE_HISTORY_ENTRY -DHAVE_REMOVE_HISTORY -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -fno-common -pipe -fno-common -c readline.c
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
So, then I though, hey! readline, other people were having issues with that... So, I should install the package for it first with rvm, before trying to install ruby.
I did
rvm pkg install readline
this worked fine.
And then I did
rvm reinstall 1.8.7, and still got an error, this time only one. still relating to readline.
So, I then tried this:
rvm reinstall 1.8.7 --with-readline-dir=$rvm_path/usr
And now everything works.
So.. this isn't really a question, so much as it is THE way to fix Mac Lion and RVM issues
in short, the solution is this:
rvm pkg install readline
rvm reinstall 1.8.7
rvm reinstall 1.8.7 --with-readline-dir=$rvm_path/usr
I am trying to install ruby1.9.2 using rvm on my Linux system (Mint-Linux distro), but I am unable to due to some errors which I cannot debug. This is the error I am getting when I run the install command.
$ rvm install 1.9.2
Installing Ruby from source to: /home/nnn/.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 - #extracted to /home/nnn/.rvm/src/ruby-1.9.2-p290 (already extracted)
Fetching yaml-0.1.4.tar.gz to /home/nnn/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /home/nnn/.rvm/src
Configuring yaml in /home/nnn/.rvm/src/yaml-0.1.4.
Compiling yaml in /home/nnn/.rvm/src/yaml-0.1.4.
Installing yaml to /home/nnn/.rvm/usr
ruby-1.9.2-p290 - #configuring
ERROR: Error running ' ./configure --prefix=/home/nnn/.rvm/rubies/ruby-1.9.2-p290 --enable-shared --disable-install-doc --with-libyaml-dir=/home/nnn/.rvm/usr ',
please read /home/nnn/.rvm/log/ruby-1.9.2-p290/configure.log
ERROR: There has been an error while running configure. Halting the installation.
The configure.log file has the following errors.
./configure --prefix=/home/nnn/.rvm/rubies/ruby-1.9.2-p290 --enable-shared --disable-install-doc --with-libyaml-dir=/home/nnn/.rvm/usr
configure: WARNING: unrecognized options: --with-libyaml-dir
configure: error: could not determine MAJOR number from version.h
Can you please help me out ?
Thanks
If you run
./configure --help
you will see that there is indeed no option 'with-libyaml-dir', it is not supported by Ruby's main configure script.
These "with-xxx-dir" parameters are often used during the compilation of extensions, where you create a Makefile by running
ruby extconf.rb --with-libimportantforextension-dir=...
In your case a workaround solution would be to install libyaml using apt-get:
sudo apt-get install libyaml
This way RVM will probably recognize that it is already installed and will not attempt to download and install it to a custom location, so you shouldn't receive the error you currently get anymore.