rvm install 2.6.7 always failed on Apple M1 mac - ruby

I always get bellow error on my M1 mac while rvm install 2.6.7
me#xx ~ % rvm install 2.6.7
ruby-2.6.7 - #removing src/ruby-2.6.7 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/11.5/x86_64/ruby-2.6.7.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/opt/homebrew/etc/openssl#1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/me/.rvm/rubies/ruby-2.6.7, this may take a while depending on your cpu(s)...
ruby-2.6.7 - #downloading ruby-2.6.7, this may take a while depending on your connection...
ruby-2.6.7 - #extracting ruby-2.6.7 to /Users/me/.rvm/src/ruby-2.6.7 - please wait
ruby-2.6.7 - #configuring - please wait
ruby-2.6.7 - #post-configuration - please wait
ruby-2.6.7 - #compiling - please wait
Error running '__rvm_make -j8',
please read /Users/me/.rvm/log/1629787822_ruby-2.6.7/make.log
There has been an error while running make. Halting the installation.

Yes, this is a known issue upstream: https://bugs.ruby-lang.org/issues/17777
ruby-build is also tracking this issue: https://github.com/rbenv/ruby-build/issues/1489
The work around is to run the following code, and install ruby 2.6.7 again:
$ export warnflags=-Wno-error=implicit-function-declaration
$ rbenv install 2.6.7
-or-
$ CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.6.7
Looks like this can also impact gem installation with native extensions (mysql2 is one of those):
gem install <GEMNAME> -- --with-cflags="-Wno-error=implicit-function-declaration"
Referenced: Error installing ruby 2.6.7 on mac os - how to resolve?

I had the same issue in RVM, following solution worked for me.
CFLAGS="-Wno-error=implicit-function-declaration" rvm install 2.6.0

I faced the same problem, the easiest way is to install 2.6.9 later version, everything will be ok.
If you really need older version ruby, you can try to use openssl#1.0. If it still is error. Maybe see this blog enter link description here, which doesn't use arm one.

Please check this it works for me.
brew install openssl
rvm install 2.6.7 --with-openssl-dir=/usr/local/opt/openssl

Related

Issue installing Ruby 2.5.0 on macos

I'm trying to work on a new app which I cloned from a repository, so I enter in the file and got this:
RVM used your Gemfile for selecting Ruby,
it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /Users/cathleenhenninot/Desktop/omnimeta-schema-manager/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.
Required ruby-2.5.0 is not installed. To install do: 'rvm install "ruby-2.5.0"'
ok, so I'm actually in ruby 2.5.1, should I install the ruby 2.5.0? Is it an obligation to work on the same version as the repository?
I tried and run rvm install "ruby-2.5.0"
and i got this:
Found old RVM 1.29.7-next - updating.
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/cathleenhenninot/.rvm/
RVM PATH line found in /Users/cathleenhenninot/.mkshrc /Users/cathleenhenninot/.profile /Users/cathleenhenninot/.bashrc.
RVM PATH line not found for Zsh, rerun this command with '--auto-dotfiles' flag to fix it.
RVM sourcing line found in /Users/cathleenhenninot/.profile /Users/cathleenhenninot/.bash_profile /Users/cathleenhenninot/.zlogin.
Upgrade of RVM in /Users/cathleenhenninot/.rvm/ is complete.
Thanks for installing RVM 🙏
Please consider donating to our open collective to help us maintain RVM.
👉 Donate: https://opencollective.com/rvm/donate
RVM reloaded!
ruby-2.5.0 - #removing src/ruby-2.5.0 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.14/x86_64/ruby-2.5.0.
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/cathleenhenninot/.rvm/rubies/ruby-2.5.0, this may take a while depending on your cpu(s)...
ruby-2.5.0 - #downloading ruby-2.5.0, this may take a while depending on your connection...
ruby-2.5.0 - #extracting ruby-2.5.0 to /Users/cathleenhenninot/.rvm/src/ruby-2.5.0 - please wait
ruby-2.5.0 - #applying patch /Users/cathleenhenninot/.rvm/patches/ruby/2.5.0/prelude_gcc_diagnostic.patch - please wait
ruby-2.5.0 - #applying patch /Users/cathleenhenninot/.rvm/patches/ruby/2.5.0/libressl_2_7.patch - please wait
ruby-2.5.0 - #configuring - please wait
Error running './configure --prefix=/Users/cathleenhenninot/.rvm/rubies/ruby-2.5.0 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/libksba:/usr/local/opt/readline:/usr/local/opt/zlib:/usr/local/opt/openssl#1.1 --disable-install-doc --enable-shared',
please read /Users/cathleenhenninot/.rvm/log/1552667484_ruby-2.5.0/configure.log
There has been an error while running configure. Halting the installation.
An error stop the installation, how do I finish the installation of ruby 2.5.0? Any help would be great! Thanks :)

Installing Ruby - RVM - Mac OSX Mountain Lion

So I'm trying to install Ruby 1.9.3 on my Mac running Mountain Lion. I have xCode installed and up to date. I've installed RVM and now am trying to install Ruby using rvm install 1.9.3 When I run this it looks like it's going to install but gives me an error please see below:
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-p392.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Already up-to-date.
Certificates in '/Users/Colin/.rvm/etc/openssl/cert.pem' already are up to date.
Installing Ruby from source to: /Users/Colin/.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/Colin/.rvm/src/ruby-1.9.3-p392 (already extracted)
ruby-1.9.3-p392 - #configuring........
Error running './configure --prefix=/Users/Colin/.rvm/rubies/ruby-1.9.3-p392 --with-opt-dir=/Users/Colin/.rvm/opt/libyaml:/Users/Colin/.rvm/opt/readline:/Users/Colin/.rvm/opt/libxml2:/Users/Colin/.rvm/opt/libxslt:/Users/Colin/.rvm/opt/libksba:/Users/Colin/.rvm/opt/openssl:/Users/Colin/.rvm/opt/sqlite --disable-install-doc --without-tcl --without-tk --enable-shared',
please read /Users/Colin/.rvm/log/ruby-1.9.3-p392/1366429269_configure.log
There has been an error while running configure. Halting the installation.
When I go to the /1366429269_configure.log file it says this:
[2013-04-19 20:41:09] ./configure
configure: WARNING: unrecognized options: --without-tcl, --without-tk
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 whether the C compiler works... no
configure: error: in `/Users/Colin/.rvm/src/ruby-1.9.3-p392':
configure: error: C compiler cannot create executables
See `config.log' for more details
If anyone could help me out it would be greatly appreciated!
Edit:
I tried the solution here Can't install Ruby under Lion with RVM – GCC issues rvm install 1.9.3 --with-gcc=clang and it changed a bit, here is the new output:
rvm install 1.9.3 --with-gcc=clang
Installing requirements for osx, might require sudo password.
Already up-to-date.
Certificates in '/Users/Colin/.rvm/etc/openssl/cert.pem' already are up to date.
Warning: found user selected compiler 'clang', this will suppress RVM auto detection mechanisms.
Installing Ruby from source to: /Users/Colin/.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/Colin/.rvm/src/ruby-1.9.3-p392 (already extracted)
ruby-1.9.3-p392 - #configuring.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
ruby-1.9.3-p392 - #compiling..................................................................
Error running 'make -j8',
please read /Users/Colin/.rvm/log/ruby-1.9.3-p392/1366431470_make.log
There has been an error while running make. Halting the installation.
And heres the log from that: http://pastebin.com/P6nTZRQY
EDIT
Not sure what happened but I just tried the same thing and now it's working perfect. Thank you everyone who left a helpful comment, it's greatly appreciated!
You need to update Command Line Tools to latest version, also for ruby 1.9.3 it is still preferred to use gcc-4.2 for compilation.
Also make sure you update RVM before trying again:
rvm get head
rvm install 1.9.2
Finally, Ruby 2.0.0 should be compatible with 1.9.3 and you should update.
I ran into similar issues trying to install Ruby on Rails on Lion a month ago. In the end, I used an installer. If using an installer is a viable option for you, check out the Rails Installer.
try to use this it will install all
wget --no-check-certificate https://raw.github.com/joshfng/railsready/master/railsready.sh && bash railsready.sh

RVM keeps setting up ruby 1.8.7 instead of the latest version 1.9 in MAC

I cannot install ruby properly using RVM..
The error says:
No binary rubies available for: downloads/ruby-1.9.3-p327.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Fetching yaml-0.1.4.tar.gz to /Users/xiruki/.rvm/archives
Extracting yaml to /Users/xiruki/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/xiruki/.rvm/src/yaml-0.1.4.
Error running './configure --prefix=/Users/xiruki/.rvm/usr', please read /Users/xiruki/.rvm/log/ruby-1.9.3-p327/yaml/configure.log
Compiling yaml in /Users/xiruki/.rvm/src/yaml-0.1.4.
Error running 'make', please read /Users/xiruki/.rvm/log/ruby-1.9.3-p327/yaml/make.log
Installing Ruby from source to: /Users/xiruki/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracted to /Users/xiruki/.rvm/src/ruby-1.9.3-p327 (already extracted)
ruby-1.9.3-p327 - #configuring
Error running './configure --enable-shared --disable-install-doc --prefix=/Users/xiruki/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/xiruki/.rvm/usr', please read /Users/xiruki/.rvm/log/ruby-1.9.3-p327/configure.log
There has been an error while running configure. Halting the installation.
What could be the problem? Please bear with me because I am new to MAC.
I am trying to install ruby 1.9.3
But it sticks to ruby 1.8.7 after i installed RVM via curl command.
whenever i try to install ruby 1.9.3 using rvm install command... it keeps on displaying errors.
Do the following:
I too recommend you make sure to read rvm requirements but here's the gist of it for your convenience.
Upgrade to the latest Xcode, launch it, go to Preferences -> Downloads -> click "Install" for "Command Line Tools".
Install homebrew if you don't already have it. Then:
brew update
brew upgrade
brew install git
If you need to install rubies older than 1.9.3 do the following:
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl
At this point you should rvm reinstall all of your rubies so they're compiled against all of your new stuff. Be sure to then run rvm use [RUBY] --default to use that ruby and make it the default one.
You need a compiler. Xcode command line tools or gcc. You probably have homebrew installed. I recommend you run brew doctor and follow the instructions.
You also must add a line to your bash file. This commands does that for you:
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
After that you should be good.
UPDATE:
Instead of installing Xcode see what this command tells your to do:
rvm requirements
I don't use rvm at the moment but it seems your will be better with gcc wich that command tells you to install.

Missing lib 'libruby.so.1.9' error while ruby installation in Ubuntu 12.4 using rvm

I am trying to install ruby using rvm on a remote server through terminal.
I am following this link
http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
But at the install step I get the following error. I tried to look for the issue over net but couldn't resolve it. Please help me here.
$ rvm install 1.9.3
https://rvm.io/binaries/ubuntu/12.04/x86_64/ruby-1.9.3-p286.tar.bz2 - #configure<br>
ruby-1.9.3-p286 - #download<br>
ruby-1.9.3-p286 - #extract<br>
ruby-1.9.3-p286 - #validate<br>
**Libraries missing for ruby-1.9.3-p286: libruby.so.1.9. Refer to your system manual for installing libraries** <br>
Mounting remote ruby failed, trying to compile.<br>
Installing Ruby from source to: /home/ubuntu/.rvm/rubies/ruby-1.9.3-p286, this may take a while depending on your cpu(s)...<br>
ruby-1.9.3-p286 - #downloading ruby-1.9.3-p286, this may take a while depending on your connection...<br>
ruby-1.9.3-p286 - #extracted to /home/ubuntu/.rvm/src/ruby-1.9.3-p286 (already extracted)
Patch cflags was already applied.<br>
ruby-1.9.3-p286 - #configuring<br>
ruby-1.9.3-p286 - #compiling<br>
Write failed: Broken pipe
try to update rvm first, this problem is supposed to be fixed already:
rvm get head
rvm reinstall 1.9.3
if you still see it report problems/errors here: https://github.com/wayneeseguin/rvm/issues

Issue installing 1.8.7 p358 under RVM

After getting Xcode rvm install 1.9.3 works totally fine. However, rvm install 1.8.7 throws the following error.
~ ☺ rvm install 1.8.7
Installing Ruby from source to: /Users/jordanscales/.rvm/rubies/ruby-1.8.7-p358, this may take a while depending on your cpu(s)...
ruby-1.8.7-p358 - #fetching
ruby-1.8.7-p358 - #extracting ruby-1.8.7-p358 to /Users/jordanscales/.rvm/src/ruby-1.8.7-p358
Error running 'tar xjf /Users/jordanscales/.rvm/archives/ruby-1.8.7-p358.tar.bz2 -C /Users/jordanscales/.rvm/tmp/rvm_src_30581 ', please read /Users/jordanscales/.rvm/log/ruby-1.8.7-p358/extract.log
There has been an error while trying to extract the source.
Halting the installation.
There has been an error fetching the ruby interpreter. Halting the installation.
Please be aware that you just installed a ruby that requires 2 patches just to be compiled on up to date linux system.
This may have known and unaccounted for security vulnerabilities.
Please consider upgrading to Ruby 1.9.3-194 which will have all of the latest security patches.
~ ☺
The log reads
[2012-06-04 17:06:23] tar xjf /Users/jordanscales/.rvm/archives/ruby-1.8.7-p358.tar.bz2 -C /Users/jordanscales/.rvm/tmp/rvm_src_30581
ruby-1.8.7-p358/lib/test/unit/ui/gtk/testrunner.rb: (Empty error message)
tar: Error exit delayed from previous errors.
Any idea how to fix? I've tried rvm get head, installing gcc-4.2 and using that, using clang, etc. But nothing seems to work.
Make sure to satisfy all requirements specified by:
rvm requirements
Including Xcode 4.1 or osx-gcc-installer
Run (to fix broken download):
rvm cleanup archives
and try again:
rvm reinstall 1.8.7
Is there any reason why you are going with 1.8.7? it's about at end of life and 1.9.3 should be used instead if this is not an requirement.

Resources