I'm getting an error while trying to install 2.3 ruby on osx
I've updated rvm to stable 1.27.0
then I'm trying to install 2.3
% rvm install 2.3
ruby-2.3.0 - #removing src/ruby-2.3.0 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.11/x86_64/ruby-2.3.0.
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/password123/.rvm/rubies/ruby-2.3.0, this may take a while depending on your cpu(s)...
ruby-2.3.0 - #downloading ruby-2.3.0, this may take a while depending on your connection...
ruby-2.3.0 - #extracting ruby-2.3.0 to /Users/password123/.rvm/src/ruby-2.3.0 - please wait
ruby-2.3.0 - #configuring - please wait
ruby-2.3.0 - #post-configuration - please wait
ruby-2.3.0 - #compiling - please wait
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/password123/.rvm/log/1460728216_ruby-2.3.0/make.log
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ossl_ssl.c:18:35: note: expanded from macro 'numberof'
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0]))
^~~~~
ossl_ssl.c:2266:21: error: invalid application of 'sizeof' to an incomplete type 'const struct (anonymous struct at ossl_ssl.c:85:14) []'
for (i = 0; i < numberof(ossl_ssl_method_tab); i++) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ossl_ssl.c:18:35: note: expanded from macro 'numberof'
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0]))
^~~~~
4 warnings and 10 errors generated.
make[2]: *** [ossl_ssl.o] Error 1
make[1]: *** [ext/openssl/all] Error 2
make: *** [build-ext] Error 2
+__rvm_make:0> return 2
There has been an error while running make. Halting the installation.
Could you advise me any steps to fix this error ?
Based on this rbenv discussion, I was able to work around this by uninstalling, reinstalling, and force-linking Homebrew OpenSSL:
brew uninstall --force openssl
brew install openssl
brew link --overwrite openssl --force
rvm install 2.3.0
I'd feel better if I knew what side effects the brew link might have, but it worked.
It worked for me:
Restart osx, then
brew uninstall openssl
brew unlink openssl098
brew install openssl
brew link --overwrite --force openssl
rvm install 2.3.0 # (or rvm install 2.3.1)
Based on https://github.com/rvm/rvm/issues/3656
Still getting the same error after running the lines mentionned,
Finally I solved my problem by updating hombrew, then uninstall and install openssl, then rvm install ruby 2.3 again
There are issues installing ruby <=2.3.0 compatibility with Openssl#1.1.
This worked for me
rvm install 2.3.0 --with-openssl-lib=/opt/local/lib/openssl --with-openssl-include=/opt/local/include/openssl
OpenSSL 1.1 isn’t compatible with Ruby 2.3.x checkout this issue here
I solved the issue on mac by using following command.
rvm reinstall ruby-2.3.8 --with-openssl-dir=`brew --prefix openssl#1.0` --debug
If you want more insights on the issue you can refer to this article https://mentalized.net/journal/2019/09/13/ruby-2-3-rvm-and-openssl-1-0/
Related
After upgrading MacOS to 10.14.2 Mojave, I'm not able to install any Ruby Version with RVM anymore. It always gives an error like this:
$rvm install 2.5.3
ruby-2.5.3 - #removing src/ruby-2.5.3..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.14/x86_64/ruby-2.5.3.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl#1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/jdinse/.rvm/rubies/ruby-2.5.3, this may take a while depending on your cpu(s)...
ruby-2.5.3 - #downloading ruby-2.5.3, this may take a while depending on your connection...
ruby-2.5.3 - #extracting ruby-2.5.3 to /Users/jdinse/.rvm/src/ruby-2.5.3.....
ruby-2.5.3 - #configuring....................................................................
ruby-2.5.3 - #post-configuration.
ruby-2.5.3 - #compiling....................
Error running '__rvm_make -j4',
please read /Users/jdinse/.rvm/log/1547136259_ruby-2.5.3/make.log
There has been an error while running make. Halting the installation.
Looking into make.log, the only errors are like this:
making srcs under enc
make[1]: Nothing to be done for `srcs'.
generating transdb.h
linking static-library libruby.2.5.3-static.a
libtool: object: dln.o malformed object (unknown load command 1)
libtool: object: localeinit.o malformed object (unknown load command 1)
libtool: object: loadpath.o malformed object (unknown load command 1)
libtool: object: array.o malformed object (unknown load command 1)
libtool: object: bignum.o malformed object (unknown load command 1)
libtool: object: class.o malformed object (unknown load command 1)
...
What I've tried so far:
reinstalled RVM
trying previous RVM 1.29.6 or master branch
reinstalled Homebrew
reinstalled XCode
reinstalled Command Line Tools
installed gcc, gcc#7 or gcc#8 with homebrew, or uninstalled all of them
installed openssl or openssl#1.1, or uninstalled all of them
Nothing of this nor any other tips of similar questions helped.
Any ideas? Or any idea what caused the error libtool: object: dln.o malformed object (unknown load command 1) and how to fix it?
I ran into this issue as well. In my case it was due to MacPorts being outdated after I upgraded to (MacOS) Mojave.
I followed the steps listed on MacPorts' migration guide here:
https://trac.macports.org/wiki/Migration
Closed and reopened Terminal (just b/c)
ran rvm install ruby and got Install of ruby-2.6.0 - #complete, hooray!
Do you have multiple versions of boost installed? I took the following steps to fix this (although I was using rbenv).
First I removed my xcode lib:
rm -rf /Library/Developer/CommandLineTools
Then I reinstalled it:
xcode-select --install
Then I ran brew ls and noticed I had two versions of boost. boost and boost#1.6.0. I removed boost#1.6.0 and boost and reinstalled boost and made sure it was linked via brew link boost.
Seemed to work after that.
I was finally able to fix it by completely removing (a very old version of) MacPorts. Everything else kept giving me the same issues.
Hope this works for you as well. It took me more than a day to find a hint that lead me to this point.
I am on ubuntu 12.04.5 LTS and tried installing ruby with jemalloc. The jemalloc got installed successfully(https://blog.scalingo.com/2017/05/02/improve-ruby-application-memory-jemalloc.html) but while installing the ruby 2.3.4, it gave this following error.
>rvm install 2.3.4 -C --with-jemalloc
Warning, new version of rvm available '1.29.1', you are using older version '1.27.0'.
You can disable this warning with: echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable auto-update with: echo rvm_autoupdate_flag=2 >> ~/.rvmrc
ruby-2.3.4 - #removing src/ruby-2.3.4..
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /home/deploy/.rvm/rubies/ruby-2.3.4, this may take a while depending on your cpu(s)...
ruby-2.3.4 - #downloading ruby-2.3.4, this may take a while depending on your connection...
ruby-2.3.4 - #extracting ruby-2.3.4 to /home/deploy/.rvm/src/ruby-2.3.4....
ruby-2.3.4 - #configuring...........................................................
ruby-2.3.4 - #post-configuration..
ruby-2.3.4 - #compiling.....
Error running '__rvm_make -j2',
showing last 15 lines of /home/deploy/.rvm/log/1494486344_ruby-2.3.4/make.log
compiling enumerator.c
compiling error.c
compiling eval.c
eval.c: In function 'rb_raise_jump':
eval.c:763:8: warning: unused variable 'mid' [-Wunused-variable]
compiling load.c
compiling proc.c
compiling file.c
compiling gc.c
In file included from gc.c:50:0:
/usr/include/malloc.h:152:15: error: conflicting types for 'malloc_usable_size'
/usr/include/jemalloc/jemalloc.h:45:8: note: previous declaration of 'malloc_usable_size' was here
make: *** [gc.o] Error 1
make: *** Waiting for unfinished jobs....
++ return 2
There has been an error while running make. Halting the installation.
Has anyone encountered it before or may have the experience with it, please help.
On [xK]ubuntu 18.10
I did
sudo apt install libjemalloc-dev
rvm install 2.5.2 -C --with-jemalloc
rvm use 2.5.2
ruby -r rbconfig -e "puts RbConfig::CONFIG['LIBS']"
I use Ubuntu 18.04.
Change the command like this
RUBY_EXTRA_CONFIGURE_OPTIONS="--with-jemalloc" rvm install 2.3.4 --disable-binary
To check the jemalloc is installed, run the following command:
ruby -r rbconfig -e "puts RbConfig::CONFIG['LIBS']"
if the ruby is unrecognized after rvm is installed.
source ~/.rvm/scripts/rvm
When the jemalloc is called. You can see the response.
-lpthread -ljemalloc -ldl -lobjc
You can see the full documentation here
I ran across a variant of this issue when trying to get rails to use jemalloc. In my case I had (purposefully) installed system-wide rubies via rvm but forgotten to use rvmsudo like so:
$ sudo apt update; sudo apt install libjemalloc-dev -y
$ rvmsudo rvm reinstall 2.4.1 -C --with-jemalloc
If you're getting permissions warnings when trying to get jemalloc to work in an analogous scenario, give ^^^ a shot...
When I attempt installation using
rvm install 2.2
or
rvm install ruby-2.2.4
I get the following error when I input rvm use 2.2 or rvm use 2.2.4:
ruby-2.2.4 is not installed.
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-2.2.4. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx_brew.
Installing requirements for osx_brew.
Updating system.....
Installing required packages: openssl.......
Error running 'requirements_osx_brew_libs_install openssl', showing last 15 lines of /Users/mikejschorah/.rvm/log/1468093589_ruby-2.2.4/package_install_openssl.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 github.com/Homebrew/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 github.com/Homebrew/homebrew/wiki/Installation
++ case "$_system_version" in ++ return 1
Requirements installation failed with status: 1.`
From the unformatted error output it can be seen that rvm cannot install openssl which is a requirement for ruby.
Run this command to install it using brew.
brew install openssl
RVM is installed and running. I am trying to install Ruby 2.0, but this happens with any version I try to install. This is a fresh install of rvm without ruby. I am running Debian Squeeze.
After running
rvm install 2.0
I get this error:
Installing Ruby from source to: /home/user/.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 /home/user/.rvm/src/ruby-2.0.0-p0 (already extracted)
ruby-2.0.0-p0 - #configuring...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Error running './configure --prefix=/home/user/.rvm/rubies/ruby-2.0.0-p0 --disable-install-doc --enable-shared',
please read /home/user/.rvm/log/ruby-2.0.0-p0/configure.log
There has been an error while running configure. Halting the installation.
I see this error when I read /home/user/.rvm/log/ruby-2.0.0-p0/configure.log
checking if make is GNU make... ./configure: line 18790: make: command
not found no checking for safe null command for make... configure:
error: no candidate for safe null command
I then run:
rvm install 2.0.0 --autolibs=4 --debug
Then I get this error
ruby-2.0.0-p0 - #configuring... Error running './configure
--prefix=/home/user/.rvm/rubies/ruby-2.0.0-p0 --disable-install-doc --enable-shared', please read /home/user/.rvm/log/ruby-2.0.0-p0/configure.log There has been an error while running configure. Halting the installation.
__rvm_rm_rf already gone: /home/user/.rvm/tmp/26623*
I am not sure what to do after this point
Generally for certain gems you will probably also need
apt-get install build-essential
I can't get rvm to install Ruby 1.9.3; it keeps on asking for the Homebrew library 'libksba' even though it is already downloaded and installed. When I run the 'brew list' command it shows clearly.
I also have Xcode 4.5 installed.
Is this an environmental variables configuration issue, and I need to configure the path so that they can see each other? If it is, how do I configure it?
How do Homebrew and rvm work together? I'm not clear about this.
Thank you.
rvm install 1.9.3
Ruby (and needed base gems) for your selection will be installed shortly.
Before it happens, please read and execute the instructions below.
Please use a separate terminal to execute any additional commands.
Notes for Mac OS X 10.8.2, Xcode 4.5.2.
For JRuby: Install the JDK. See http://developer.apple.com/java/download/ # Current Java version "1.6.0_26"
For IronRuby: Install Mono >= 2.6
For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
For Opal: Install Nodejs with NPM. See http://nodejs.org/download/
To use an RVM installed Ruby as default, instead of the system ruby:
rvm install 1.8.7 # installs patch 357: closest supported version
rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
rvm alias create default 1.8.7
And reopen your terminal windows.
Xcode and gcc:
:
'brew list' command output
brew list
apple-gcc42 automake libgpg-error libxml2
autoconf git libksba libxslt
Most recent session:
brew upgrade libksba
Error: libksba-1.2.0 already installed
$ brew update
Updated Homebrew from 5909e2c6 to 0e0ef31f.
==> New Formulae
globus-toolkit postgres-xc
==> Updated Formulae
casperjs cunit dxflib mysql-cluster smake
cdrtools dvdrtools ivy shmcat webalizer
==> Deleted Formulae
transcode
unknown7cd1c3e98b07:~ pdenlinger$ rvm install 1.9.3
Ruby (and needed base gems) for your selection will be installed shortly.
Before it happens, please read and execute the instructions below.
Please use a separate terminal to execute any additional commands.
Notes for Mac OS X 10.8.2, Xcode 4.5.2.
For JRuby: Install the JDK. See http://developer.apple.com/java/download/ # Current Java version "1.6.0_26"
For IronRuby: Install Mono >= 2.6
For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
For Opal: Install Nodejs with NPM. See http://nodejs.org/download/
To use an RVM installed Ruby as default, instead of the system ruby:
rvm install 1.8.7 # installs patch 357: closest supported version
rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
rvm alias create default 1.8.7
And reopen your terminal windows.
Xcode and gcc:
:
Added C compiler error:
rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p362.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p362, this may take a while depending on your cpu(s)...
ruby-1.9.3-p362 - #downloading ruby-1.9.3-p362, this may take a while depending on your connection...
ruby-1.9.3-p362 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p362 (already extracted)
ruby-1.9.3-p362 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p362 --with-opt-dir=/usr/local/rvm/usr', please read /usr/local/rvm/log/ruby-1.9.3-p362/configure.log
There has been an error while running configure. Halting the installation.
$ cat /usr/local/rvm/log/ruby-1.9.3-p362/configure.log
[2013-01-01 20:20:35] env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p362 --with-opt-dir=/usr/local/rvm/usr
checking build system type... x86_64-apple-darwin12.2.1
checking host system type... x86_64-apple-darwin12.2.1
checking target system type... x86_64-apple-darwin12.2.1
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
Environmental variable flags:
$ brew update
Already up-to-date.
$ brew tap homebrew/dupes
Error: Already tapped!
$ brew install autoconf automake apple-gcc42
Error: autoconf-2.69 already installed
Error: automake-1.12.6 already installed
Error: apple-gcc42-4.2.1-5666.3 already installed
$ rvm pkg install openssl
Fetching openssl-1.0.1c.tar.gz to /usr/local/rvm/archives
Extracting openssl to /usr/local/rvm/src/openssl-1.0.1c
Configuring openssl in /usr/local/rvm/src/openssl-1.0.1c.
Compiling openssl in /usr/local/rvm/src/openssl-1.0.1c.
Installing openssl to /usr/local/rvm/usr
Please note that it's required to reinstall all rubies:
rvm reinstall all --force
Updating openssl certificates
$ rvm reinstall all --force
$ rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p362.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p362, this may take a while depending on your cpu(s)...
ruby-1.9.3-p362 - #downloading ruby-1.9.3-p362, this may take a while depending on your connection...
ruby-1.9.3-p362 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p362 (already extracted)
ruby-1.9.3-p362 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p362 --with-opt-dir=/usr/local/rvm/usr', please read /usr/local/rvm/log/ruby-1.9.3-p362/configure.log
There has been an error while running configure. Halting the installation.
unknown7cd1c3e98b07:~ pdenlinger$ cat /usr/local/rvm/log/ruby-1.9.3-p362/configure.log
[2013-01-02 09:58:08] env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p362 --with-opt-dir=/usr/local/rvm/usr
checking build system type... x86_64-apple-darwin12.2.1
checking host system type... x86_64-apple-darwin12.2.1
checking target system type... x86_64-apple-darwin12.2.1
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
$ cat config.log
cat: config.log: No such file or directory
$
What you see is output of rvm requirements it is show using less => use up/down arrows to navigate and q to quit less and continue installation.
The requirements are shown only first time you install ruby.
It was a bug and the broken code is already fixed https://github.com/wayneeseguin/rvm/commit/848ef50f1b32c87e853f21e801f167a39e8c9c66