Downgrading openssl is not possible in OSX - ruby

After upgraded brew in OSX it also updated the openssl older version to openssl1.1 but openssl#1.1 is not supporting the older versions for ruby of 2.3.x or older but I need to use older version is there a way so that I can downgrade my openssl or brew
I don't have older version of ssl I did the rvm install version.It installed the ruby version successfully.But when I did "bundle" I am getting the error "ssl not supported .. "
Up on this: https://github.com/rvm/rvm/issues/4006 I understood its not possible to install ruby older version less than 2.4 with openssl#1.1 by using rvm. I want to know is it possibe to downgrade openssl by using brew directly?? I have tried multiple ways it not worked??

Are you sure the version is the problem? First try:
brew info openssl
Follow the instructions to be sure. If this doesn't resolve the problem, please add more info on what error's you are getting.

Related

Need help installing Ruby 2.7.2 on Mac

I'm trying to install Ruby version 2.7.2 on my Mac (latest OS with all updates) and did the following
brew update
brew upgrade rbenv ruby-build
and then
rbenv install 2.7.2
ruby-build: definition not found: 2.7.2
See all available versions with `rbenv install --list'.
If the version you need is missing, try upgrading ruby-build:
brew update && brew upgrade ruby-build
So I tried following the instructions above and get this
brew update && brew upgrade ruby-build
Already up-to-date.
Warning: ruby-build 20200926 already installed
You need to install the latest ruby-build
$ brew unlink ruby-build # remove STABLE version
$ brew install --HEAD ruby-build
$ rbenv install -l | grep '2.7.2'
2.7.2
Only latest stable releases for each Ruby implementation are shown.
Use 'rbenv install --list-all' to show all local versions.
The answer from #andrei-kovrov is correct but, alternatively, you can wait until this PR gets merged:
https://github.com/Homebrew/homebrew-core/pull/62096
Btw, this answer will not age well so, for reference, this is where the formulae are staged before they get released:
https://github.com/Homebrew/homebrew-core/pulls
It might be an issue reading the correct version of ruby based on the path that is specified. If you already have another version of ruby installed the path might not be updated to look for a newer version.
This article has a lot of really great information on how to set up ruby on a mac:
https://stackify.com/install-ruby-on-your-mac-everything-you-need-to-get-going/

gdal with openssl 1.1 breaks pip install and other stuff that depends on openssl 1.0 on macos

I need to install gdal.
So i run:
brew install gdal
Current version is: 2.4.4_4
and has a dependency on openssl 1.1
After successfully installed, if I go into my virtualenv, I see the following:
WARNING: pip is configured with locations that require TLS/SSL,
however the ssl module in Python is not available.
That is because pip (and other software) dependes on older version of openssl (version 1.0.x).
After searching I found this post:
https://stackoverflow.com/a/59280089/237115
where I found a way to fix the issue, by installing older version of openssl.
But of course now gdal doesnt work without openssl1.1
any way to fix this ?

Switching Ruby versions using homebrew

One of the projects that I've been working has a dependency on ruby#2.3.
I'm using a Mac and the version of Ruby that I used for other projects is the 2.5.
I want to temporarily switch from 2.5 to 2.3 using brew. I don't want to use neither rbenv nor rvm.
1. I've installed the 2.3.7 version, using brew:
bf-old> brew install ruby#2.3
Warning: ruby#2.3 2.3.7 is already installed and up-to-date
To reinstall 2.3.7, run `brew reinstall ruby#2.3
2. I'm trying to switch to it, but it's not working:
bf-old> brew switch 2.3.7
Error: 2.3.7 not found in the Cellar.
What can I do about this?
Check if both the ruby versions are installed.
If both are installed, then try this:
brew unlink ruby#2.5 && brew link --force --overwrite ruby#2.3

Protocol Buffer: Version Change

I have accidentally installed version 3.0.0 and most of my files naturally gave tons of errors. Now I want to take it back to 2.6.1. I already downloaded 2.6.1 and installed, however when I do protoc --version it still shows libprotoc 3.0.0, which is wrong.
Is there a way to set the version to 2.6.1 or is there a way to uninstall 3.0.0?
Figured it out. One should delete everything regarding google protocol buffers under /local and /include, , and then simple reinstall the other version. After that protoc --version shows the new version.
If you use pip:
pip uninstall protobuf
pip install protobuf==2.6.1

Can't install OpenSSL 1.0.1e

I've tried to install a new version of OpenSSL via Homebrew but it doesn't work. My actual OpenSSL version is 0.9.8 and I don't know what to do.
When I type on MacOS 10.8.4 brew install openssl the system brings to me the following error:
Error: openssl-1.0.1e already installed
So when I type openssl version I see this:
OpenSSL 0.9.8x 10 May 2012
How can I turn the actual version to the new version installed via Homebrew? Any tips?
My guess is that OS X has an older version of openssl in /usr/bin, and Homebrew places it's version in /usr/local/bin
Try
/usr/local/bin/openssl version
Edit: Before you try the above command, run:
brew link --force openssl

Resources