"No available formula for gcc46" while installing Ruby 1.9.3 on OS X with RVM: - ruby

I have Homebrew installed, I'm trying to install RVM with:
rvm install 1.9.3-head
and I get this error:
Installing required packages:gcc46
Error running 'requirements_osx_brew_libs_install gcc46',
please read /Users/mike/.rvm/log/1384918134_ruby-1.9.3-head/package_install_gcc46.log
Requirements installation failed with status: 1
brew doctor says I'm ready to brew.
In the log I see:
Error: Download failed: ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-4.3.2.tar.bz2

Ruby 1.9.3+ supports compiling with Clang (which you do have) instead of GCC, so make RVM compile with Clang instead:
rvm install 1.9.3 --with-gcc=clang

When I upgraded to mavericks from mountain lion it somehow started ignoring my dev-tools (like gcc, etc.) try
xcode-select --install
also see here

When upgraded to OSX 10.12 and installing ruby 2.3.1 these steps fixed the issue.
brew install homebrew/versions/gcc46
if there are any linking issues related to any lib please follow the instructions for example
brew link --overwrite libtool
brew link --overwrite libgpg-error
Once the installation of gcc46 is successful you could
rvm install 2.3.1

Related

Downgrade to OPENSSL version 1.0 from 1.1 on mac

I have ruby version 2.1.5 installed on my system.
On running bundle install, I am getting
"Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using RVM are available at
http://rvm.io/packages/openssl."
My Gemfile has soures with http only.
On executing "rvm pkg install openssl" :
==> Formulae
curl-openssl glib-openssl openssl#1.1 ✔ homebrew/portable-ruby/portable-openssl
There is no openssl#1.0 and openssl
How to degrade to openssl#1.0 from 1.0.
Already tried rvm reinstall 2.1.5 --with-openssl-dir=brew --prefix openssl#1.0
But it is of no use for me.
The previous solution doesn't work any more, I have succeeded with the following steps:
brew install rbenv/tap/openssl#1.0
ln -sfn /usr/local/Cellar/openssl#1.0/1.0.2t /usr/local/opt/openssl
I've seen this issue on rvm project where you can find more detail about this.
This step works for me, we have to wait for some official fix.
Install openssl via rvm pkg install openssl
Remove and reinstall rubies with rvm reinstall 2.1.5
--with-openssl-dir=$HOME/.rvm/usr
I have tried the solution on Mac OS X Catalina and it works.
Download the file: https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
Run brew with the file downloaded: brew install openssl.rb

RVM requirements error

I have OS X Mavericks installed and I'm trying to run rvm requirements in terminal and it gives me this error.
Installing required packages: autoconf, automake, libtool, pkgconfig, libyaml, libffi, readline, libksba, curl-ca-bundle, gdbm.............
Error running 'requirements_osx_port_libs_install autoconf automake libtool pkgconfig libyaml libffi readline libksba curl-ca-bundle gdbm',
please read /Users/Alex/.rvm/log/ruby-1.9.3-p448/1374263757_package_install_autoconf_automake_libtool_pkgconfig_libyaml_libffi_readline_libksba_curl-ca-bundle_gdbm.log
Requirements installation failed with status: 1.
It looks like RVM tried to install some dependencies using Macports and Macports proceeded to get really confused about dependencies when it tried to install autoconf.
Try running:
brew install autoconf
Otherwise you should run this bash script:
https://gist.github.com/siraj/1399288
Assuming you have brew, which you should if you don't.
If your Macports just isn't working, then you can manually install all of the requirements like this:
brew install autoconf automake libtool pkgconfig libyaml libffi readline libksba curl-ca-bundle gdbm
I tried the above, and a few other things. None worked.
It seems that on OSX 10.9 and XCode5 moved some libs around on us. So I had to install XCode5-DP6 (Dev Preview 6), opened up DP6 and in the settings, you have to tell the command line tools to use the new DP6 build and not the Standard XCode from the marketplace.
First, I had to install homebrew. Nothing liked to play with macports. I am on my first mac as of only a month ago, so macports was just what solved apache for me at the time. I then had to run 'brew install autoconf'
Once I did that I then ran rvm requirements, everything installed without issue. then sudo gem install jekyll from there and it all works like a charm now.
I'm sure once Mavericks is actually released this will get ironed out. We are using early releases after all...
Hope this works for you guys.

OpenSSL error installing ruby 2.0.0-p195 on Mac with rbenv

I'm trying to install Ruby 2.0.0-p195 using rbenv on a Mac (Mountain Lion) and got this error.
BUILD FAILED
Inspect or clean up the working tree at /var/folders/vt/27n8h2yj27v7rzq58075f3_m0000gn/T/ruby-build.20130618163859.1669
Results logged to /var/folders/vt/27n8h2yj27v7rzq58075f3_m0000gn/T/ruby-build.20130618163859.1669.log
Last 10 log lines:
installing default gems: /Users/me/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0 (build_info, cache, doc, gems, specifications)
bigdecimal 1.2.0
io-console 0.4.2
json 1.7.7
minitest 4.3.2
psych 2.0.0
rake 0.9.6
rdoc 4.0.0
test-unit 2.0.0.0
The Ruby openssl extension was not compiled. Missing the OpenSSL lib?
When I ran brew install openssl it said
Warning: openssl-1.0.1e already installed
Following a solution on this thread https://github.com/sstephenson/ruby-build/issues/305 I tried to install latest stable this way and got the same error
env CFLAGS='-g -O2' RUBY_CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline`" rbenv install 2.0.0-p195
Any ideas?
Try adding OpenSSL to the config options using the --with-openssl-dir option:
$ CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl`" rbenv install 2.0.0-p195
If you're using Homebrew, you'll need to install OpenSSL before running the above by running:
$ brew install openssl
UPDATE (see #JarkkoLaine 's comment below):
Just for the record, you should not need to use the config opts
anymore with ruby-build and homebrew. However, I had to reinstall
openssl with homebrew to make it work: brew uninstall openssl; brew
upgrade; brew install openssl; rbenv install 2.0.0-p247. See this for
more info.
I fixed this by executing:
brew link openssl --force
Mac OSX 10.9.4
Upgrading to the latest version of ruby-build fixed the problem for me:
Like the OP, I got
BUILD FAILED
Inspect or clean up the working tree at /Users/me/.rbenv/sources/2.0.0-p247
Results logged to /var/folders/3x/y_8y8vr53ws_kxj97km79q5h0000gn/T/ruby-build.20130704172404.3106.log
Last 10 log lines:
installing default gems: /Users/me/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0 (build_info, cache, doc, gems, specifications)
bigdecimal 1.2.0
io-console 0.4.2
json 1.7.7
minitest 4.3.2
psych 2.0.0
rake 0.9.6
rdoc 4.0.0
test-unit 2.0.0.0
The Ruby openssl extension was not compiled. Missing the OpenSSL lib?
but installing the latest version of ruby-build, via
# Don't forget brew doctor and brew update if required
brew upgrade ruby-build
fixed it.
Ruby-build had some changes between when the OP asked and now, which would explain why it worked for me, but not for the OP using the latest stable version of ruby-build.
For those who have problems installing openssl.
I had this error on my Mac 10.8.4
brew install openssl
created directory `/usr/local/Cellar/openssl/1.0.1e/include/openssl'
make: *** [install_sw] Error 13
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
These open issues may also help:
https://github.com/mxcl/homebrew/pull/19429
Create a directory if it does not exist
sudo mkdir /usr/local/etc/openssl
Change the rights. Replace and with your name and group (e.g. serge:admin)
sudo chown -R <username>:<group> /usr/local/etc/openssl/
Repeat openssl installation
brew install openssl
Install curl-ca-bundle
brew install curl-ca-bundle
install ruby
CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl`" rbenv install 2.0.0-p195
Bingo
Solution using ruby-install:
After uninstalling and installing openssl a couple of times (probably unnecessary) I successfully tried this:
ruby-install ruby 2.1.3 -- --with-openssl-dir=`brew --prefix openssl`
The missing library is libssl*-dev* / openssl*-dev*, depending your distribution.
This issue came up again for me with Mac OS 10.9.5
Mac upgraded the command-line tools and that upgraded openssl, which broken rbenv.
I tried all of these solutions, but none of them worked. Everything was up-to-date, but I couldn't install any new gems or build rubies.
My solution was to:
Remove the ruby version (for me it was 2.1.1)
Brew uninstall ruby-build and rbenv
Brew Re-install rbenv and ruby-build
Hope this helps you if you encounter it too!

installing Rails 1.9.3 using RVM gives error message

I'm learning Ruby from Michael Hartl's tutorial. I'm following the steps one by one, but I can't get passed this one. After installing RVM, the instructions are:
rvm get head && rvm reload
rvm install 1.9.3
I can do the first line in the terminal, but when I do the 2nd I get the following error message:
"Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config apple-gcc42 libyaml readline libxml2 libxslt libksba openssl',
please read /Users/sg/.rvm/log/ruby-1.9.3-p429/1370816489_package_install_autoconf_automake_libtool_pkg-config_apple-gcc42_libyaml_readline_libxml2_libxslt_libksba_openssl.log"
What can I do to fix this error? I'm using OS X Mountain Lion on a Retina MacBook Pro if that makes a difference.
run
rvm requirements
See if you have installed everything that is required

Error compiling ruby 1.9.3 using rvm, homebrew, or macports

I've tried installing ruby 1.9.3 using rvm, using homebrew, and using macports and all seem to fail part way through the compile. I'm using Lion OSX.
Here is the log file of my most recent attempt using rvm
http://pastebin.com/AEiJbGzD
Any help would be appreciated. It all started when I started getting openssl errors so tried uninstalling openssl and re-installing it. Openssl installed with no issue but then I couldn't get ruby re-installed.
Thanks
I was able to install Ruby 1.9.3 on Lion and Xcode 4.2 using rvm with the --with-gcc=clang flag:
$ rvm install 1.9.3 --with-gcc=clang
You should install OSX GCC installer:
GitHub - OSX GCC Installer
After installation you run:
CC=/usr/bin/gcc-4.2 rvm install 1.9.3
And it should work.
Or you can change permanently:
export CC=/usr/bin/gcc-4.2
rvm install 1.9.3
Xcode 4.2 doesn't install non-LLVM gcc anymore.
I have had this problem after reinstall mountain lion (clean install) and after install XCode 5 DP... I have followed the steps and installed Command Line Tools from Xcode/Preferences... and had having the same problem.
I have been checking https://developer.apple.com/downloads/index.action?=command%20line%20tools and installed "Command Line Tools (OS X Mountain Lion) for Xcode - April 2013" after that, everything works fine.
Regards

Resources