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

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 ?

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

Downgrading openssl is not possible in OSX

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.

Install Ubuntu equivalent libraries in Macos e.g libssl-dev

I would like to install ubuntu libraries listed below in macos. Please does anyone know what the equivalent commands in macos terminal are? I have searched homebrew already and they don't exist there.
apt-get install -y build-essential libssl-dev libnet-ssleay-perl libcrypt-ssleay-perl libidn11-dev
Any pointers in the right direction will be highly appreciated.
There’s no equivalent to build-essential on macOS because those basic tools are already installed.
libssl-dev is OpenSSL: brew install openssl
libnet-ssleay-perl and libcrypt-ssleay-perl are just Perl modules Net::SSLeay and Crypt::SSLeay. You should be able to install them with cpan.
libidn11-dev can be installed with brew install libidn. The Debian package installs version 1.29 while Homebrew installs 1.33.
For a more generic approach, here is what you can try to "convert" a Debian package name into a Homebrew one:
Strip any -dev suffix and brew search the resulting name; e.g. libidn11-dev -> brew search libidn11.
Try without any version suffix: brew search libidn. If you find a match, run brew info <formula> to check its version. Note Homebrew sometimes has fixed-version packages, like openssl#1.1 for openssl version 1.1.
Search the package on packages.debian.org to see what it installs. For example, libssl-dev’s description says:
This package is part of the OpenSSL project's implementation of the SSL and TLS cryptographic protocols for secure communication over the Internet.
We can then brew search openssl to see there’s a package that matches this exactly.

OSX's openssl version is diffrent from brew's openssl

I just typed openssl version in terminal and I got following result:
OpenSSL 0.9.8y 5 Feb 2013
So I ran brew update and brew upgrade openssl.
Which the first one returned Updated Homebrew from 7afeb3af to 8cabfe85., And second one returned openssl-1.0.1g already installed.
So typed brew link --force openssl.
After above procedure I typed openssl version And I got the same result
OpenSSL 0.9.8y 5 Feb 2013.
How can I update openssl on mac osx 10.9.3?
Run brew info openssl and follow the instructions there. Do not try to --force link the latest openssl with the one that comes installed with OSX by default. (0.9.8)
Specifically it'll ask you to add the Homebrew version of openssl (should be 1.0.2 as of this date) into your $PATH.
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
Note: Make sure to remove any export PATH lines from the bash_profile, since this line above exports it for you appending the rest of the $PATH variable to the end. To view the bash profile use vi ~/.bash_profile
Doing this should fix any problems with installing packages (especially Ruby Gems that need compiling).
So here's what is going on. You have two copies of OpenSSL.
Version 0.9.8 - located at /usr/bin/openssl, pre-installed on OS X
Version 1.0.1g - located at /usr/local/Cellar/openssl/1.0.1h/bin/openssl, installed by brew.
When you ran brew upgrade openssl, you actually ran brew install openssl since brew had not yet install openssl on your system. (Remember, brew doesn't control all the software on your computer - only what it installed).
Turns out that the message of brew install openssl:
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, so it was not symlinked into /usr/local.
Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
The OpenSSL provided by OS X is too old for some software.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
This actually explains that OS X comes preinstalled. Using a different non-system openssl may cause issues if you change from the default openssl. Hence, brew kindly did not link it into your /usr/local which is probably part of your path.
I presume you wanted to upgrade the openssl on you box because some package you were trying to install required a newer version. Ahoy - the message tells you that you should install that software package and point it at your new shiny brew openssl.

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