SSL Error installing rbenv on Mac Catalina - ruby

I'm trying to install rbenv on Mac Catalina Version 10.15.7 using homebrew and I get this error:
gaston.ramos#AR-IT10128 ~ % brew install rbenv
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 4 formulae.
==> Downloading https://homebrew.bintray.com/bottles/autoconf-2.69.catalina.bottle.4.tar.gz
Already downloaded: /Users/gaston.ramos/Library/Caches/Homebrew/downloads/c473cc5dd3e84f64b99973078d9d9caae87e7810e6e771008e63d651bbe8007f--autoconf-2.69.catalina.bottle.4.tar.gz
==> Downloading https://github.com/rbenv/ruby-build/archive/v20201221.tar.gz
##O#- #
curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number
Error: Failed to download resource "ruby-build"
Download failed: https://github.com/rbenv/ruby-build/archive/v20201221.tar.gz
Any idea on how to solve this? It seems that there is an SSL error when brew tries to download ruby-build
Thanks.

Use a different mirror
foo#bar$ env HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles brew install rbenv

Related

Can't install emacs in Homebrew

$ brew install emacs
Updating Homebrew...
Warning: Treating emacs as a formula. For the cask, use homebrew/cask/emacs
==> Downloading https://homebrew.bintray.com/bottles/emacs-27.1.mojave.bottle.1.tar.gz
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/edc19e2cbf4d5136f0e31adfb9c57161b65dd8163f861a92e10bfd617d1d611c--emacs-27.1.mojave.bottle.1.tar.gz
==> Pouring emacs-27.1.mojave.bottle.1.tar.gz
==> emacs cask is installed, skipping link.
==> Caveats
To have launchd start emacs now and restart at login:
brew services start emacs
Or, if you don't want/need a background service you can just run:
emacs
==> Summary
๐Ÿบ /usr/local/Cellar/emacs/27.1: 4,009 files, 104.0MB
==> Upgrading 1 dependent:
cask 0.8.4 -> 0.8.5
==> Upgrading cask 0.8.4 -> 0.8.5
==> Downloading https://github.com/cask/cask/archive/v0.8.5.tar.gz
==> Downloading from https://codeload.github.com/cask/cask/tar.gz/v0.8.5
######################################################################## 100.0%
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/emacs not present or broken
Please reinstall emacs. Sorry :(
How to fix this?
By looking at the output, it seems emacs actually got installed:
==> Summary
๐Ÿบ /usr/local/Cellar/emacs/27.1: 4,009 files, 104.0MB
You should be able to use it straight away.
If you prefer a GUI version, you can install it with:
brew install --cask emacs
The problem
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/emacs not present or broken
Please reinstall emacs. Sorry :(
It's another tool, cask, which fails to install:
It cannot find the emacs dir under /usr/local/opt/emacs.
Homebrew installed it at /usr/local/Cellar/emacs/27.1.
The fix
You can fix it by:
(Recommended) Creating a symlink in /usr/local/opt/ to emacs directory
$ brew link --overwrite emacs # if it complains about relinking, run brew unlink emacs && brew link emacs instead
$ brew install cask
(Alternative) If the previous point didn't help, ignoring dependencies while installing cask
$ brew install cask --ignore-dependencies
Please let me know if it helped

brew cannot find ANY packages

I just got my Mac Pro from the shop after hard drive failure. I am trying to install my environment again.
I installed homebrew from the current link on the homebrew website:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
but I cannot install ANY package. Brew cannot find ANYTHING.
~ brew install rbenv
Error: No available formula with the name "rbenv"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
What is wrong?
I had the same issue and I was able to solve it by running the doctor command and follow the steps which need to be updated there.
My homebrew-core was not at the master branch.
brew doctor
git -C $(brew --repo homebrew/core) checkout master
And that's it. After that, I was able to run the rbenv install command.
brew search result
$ brew search rbenv
==> Formulae
rbenv rbenv-bundle-exec rbenv-chefdk rbenv-default-gems rbenv-vars
rbenv-aliases rbenv-bundler rbenv-communal-gems rbenv-gemset rbenv-whatis
rbenv-binstubs rbenv-bundler-ruby-version rbenv-ctags rbenv-use
install rbenv
$ brew install rbenv
==> Downloading https://github.com/rbenv/ruby-build/archive/v20200819.tar.gz
==> Downloading from https://codeload.github.com/rbenv/ruby-build/tar.gz/v20200819
######################################################################## 100.0%
==> Downloading https://homebrew.bintray.com/bottles/rbenv-1.1.2.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Installing dependencies for rbenv: ruby-build
==> Installing rbenv dependency: ruby-build
==> ./install.sh
==> Caveats
ruby-build installs a non-Homebrew OpenSSL for each Ruby version installed and these are never upgraded.
To link Rubies to Homebrew's OpenSSL 1.1 (which is upgraded) add the following
to your /Users/rchen/.bash_profile:
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.1)"
Note: this may interfere with building old versions of Ruby (e.g <2.4) that use
OpenSSL <1.1.
==> Summary
๐Ÿบ /usr/local/Cellar/ruby-build/20200819: 509 files, 253.6KB, built in 5 seconds
==> Installing rbenv
==> Pouring rbenv-1.1.2.mojave.bottle.tar.gz
๐Ÿบ /usr/local/Cellar/rbenv/1.1.2: 36 files, 65KB
==> Caveats
==> ruby-build
ruby-build installs a non-Homebrew OpenSSL for each Ruby version installed and these are never upgraded.
To link Rubies to Homebrew's OpenSSL 1.1 (which is upgraded) add the following
to your /Users/rchen/.bash_profile:
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.1)"
Note: this may interfere with building old versions of Ruby (e.g <2.4) that use
OpenSSL <1.1.
version test
$ rbenv --version
rbenv 1.1.2

Ruby Version Failure 2.7.0: Error: Permission denied # apply2files - /usr/local/share/Library/

As the title states, when I try install Ruby version 2.7.0 with rvm install ruby-2.7.0, I get the following output:
Ruby Version Failure 2.7.0: Error: Permission denied # apply2files - /usr/local/share/Library/Caches/Yarn/v6/npm-micromatch-3.1.10-70859bc95c9840952f359a068a3fc49f9ecfac23-integrity/node_modules/micromatch/lib/.DS_Stor
The full output is below:
==> Upgrading 3 outdated packages:
libtool 2.4.6_1 -> 2.4.6_2
libyaml 0.2.2 -> 0.2.5
pkg-config 0.29.2_2 -> 0.29.2_3
==> Upgrading libtool 2.4.6_1 -> 2.4.6_2
==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_2.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/af317b35d0a394b7ef55fba4950735b0392d9f31bececebf9c412261c23a01fc?response-content-disposition=attachment%3Bfilename%3D%22libtool-2.4.6_2.catalina.b
######################################################################## 100.0%
==> Pouring libtool-2.4.6_2.catalina.bottle.tar.gz
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
๐Ÿบ /usr/local/Cellar/libtool/2.4.6_2: 71 files, 3.7MB
==> `brew cleanup` has not been run in 30 days, running now...
Removing: /usr/local/Cellar/libtool/2.4.6_1... (71 files, 3.7MB)
Error: Permission denied # apply2files - /usr/local/share/Library/Caches/Yarn/v6/npm-micromatch-3.1.10-70859bc95c9840952f359a068a3fc49f9ecfac23-integrity/node_modules/micromatch/lib/.DS_Store
This is unrelated to rvm itself. To install required dependencies for your ruby, rvm used your installed homebrew. However, during cleanup of your installed bottles, homebrew encounters an error, possible because you one installed things with sudo previously.
Try brew doctor and follow its advice to fix your homebrew setup.

Libtiff dependancy fails when installing wine with homebrew OSX 10.12.3

I am trying to install wine through homebrew. When its installing the dependancies, the libtiff fails because the source package url is not found and whole installer quits. I installed libtiff seperately and then tried, still this problem occurs. Any workaround ?
Rangarajans-MBP:homebrew-core ranga$ brew install wine
==> Installing dependencies for wine: libtiff, gd, libgphoto2, little-cms2, cmake, jasper, libicns, makedepend, openssl, net-snmp, sane-backends, libtasn1, gmp, nettle, libunistring, libffi, p11-kit, gnutls
==> Installing wine dependency: libtiff
==> Using the sandbox
==> Downloading http://download.osgeo.org/libtiff/tiff-4.0.7.tar.gz
######################################################################## 100.0%
==> Downloading https://mirrors.ocf.berkeley.edu/debian/pool/main/t/tiff/tiff_4.0.7-4.debian.tar.xz
curl: (22) The requested URL returned error: 404 Not Found
Trying a mirror...
==> Downloading https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.7-4.debian.tar.xz
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "libtiff--patch"
Download failed: https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.7-4.debian.tar.xz
Rangarajans-MBP:homebrew-core ranga$
ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.7-4.debian.tโ€Œโ€‹ar.xz has been superseded by ftp.debian.org/debian/pool/main/t/tiff/tiff_4.0.7-5.debian.tโ€Œโ€‹ar.xz. If you compare the files, there's an extra CVE patch added.
To get homebrew to install wine, patch the libtiff formula to use the updated Debian package:
Open /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/libtiff.rb
Patch the following lines so it looks like this: https://gist.github.com/georghendrik/c649b62c017c89980ec6fcad31513510
url "https://mirrors.ocf.berkeley.edu/debian/pool/main/t/tiff/tiff_4.0.7-5.debian.tar.xz"
sha256 "f4183c48ed74b6c3c3a74ff1f10f0cf972d3dba0f840cf28b5a3f3846ceb2be6"
"patches/16-CVE-2016-10094.patch", (note the comma)
"patches/17-CVE-2017-5225.patch"
Run brew install wine. Homebrew will update itself and stash your work.
Run cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/; git stash pop
Run brew install wine again.

Trouble installing Ruby (Failed to download resource "readline--patch")

I'm getting this error when I try to install Ruby. I've tried looking at this and this but to no avail
โžœ ~ brew install ruby
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
==> Installing dependencies for ruby: readline, libyaml, makedepend
==> Installing ruby dependency: readline
==> Downloading https://ftpmirror.gnu.org/readline/readline-6.3.tar.gz
==> Downloading from http://mirror.team-cymru.org/gnu/readline/readline-6.3.tar.gz
######################################################################## 100.0%
==> Downloading https://gist.githubusercontent.com/jacknagel/d886531fb6623b60b2af/
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "readline--patch"
Download failed: https://gist.githubusercontent.com/jacknagel/d886531fb6623b60b2af/raw/746fc543e56bc37a26ccf05d2946a45176b0894e/readline-6.3.8.diff
I've met the same problems when I installed Ruby on my Mac. Maybe you could try the following steps to solve this problem, it works for me :)
update your brew, paste /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" at a Terminal prompt. (or following instructions on brew homepage) Or just brew update
Run brew install ruby
Good luck to you! :)

Resources