Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS OpenSSL version issue - Homebrew moved it from v1.0 to v1.1 - initial fix #635

Closed
muratcim opened this issue Nov 29, 2019 · 62 comments
Labels

Comments

@muratcim
Copy link

muratcim commented Nov 29, 2019

Hi Guys, for TagUI we may have found the permanent solution. Note that this solution may not help for other projects.
Download directly from below link. After unzipping, put contents of unzipped folder into tagui/src/phantomjs folder.

https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip

Though above zip is PhantomJS v2.1.1 (same as TagUI packaged PJS), total file size for this zip after extraction is different. It might be Ariya, creator of PhantomJS, put in a fix already just to solve this headache with macOS/OpenSSL/Homebrew.


Hi Ken,

Today I encountered some error related to openssl while installing tagui on my mac computer.
2.2.0 version of homebrew released on November 27. In this version openssl 1.0 has been deleted for end of life.brew install openssl now installs version 1.1

referance: https://brew.sh/2019/11/27/homebrew-2.2.0/

Version 1.1 has /usr/local/opt/openssl/lib/libssl.1.1.dylib instead of /usr/local/opt/openssl/lib/libssl.1.0.0.dylib

So the following lines of code in the tagui python project don't work

if not os.path.isfile('/usr/local/opt/openssl/lib/libssl.1.0.0.dylib'):
This can be corrected in some way, but most importantly, phantom addiction.phantom gives the following error in openssl 1.1 version

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /Users/mcim/.moxie-tagui/phantomjs/bin/phantomjs
Reason: image not found

I continue to research about the problem and I will share it when there is an improvement

@kensoh
Copy link
Member

kensoh commented Dec 1, 2019

Thanks for raising this Murat! I appreciate your detailed replication details. Let me have a look.

@kensoh kensoh added query bug and removed query labels Dec 1, 2019
@kensoh kensoh changed the title Openssl version problem macOS OpenSSL version problem - Homebrew moved it from v1.0 to v1.1 Dec 1, 2019
@kensoh
Copy link
Member

kensoh commented Dec 1, 2019

It seems that the recommended way to install older versions of a Homebrew formula (Homebrew/homebrew-core#46876) is not working.

When the recommended way using brew extract is used as follows -

brew uninstall openssl
brew tap-new $USER/old-openssl
brew extract --version=1.0.2t openssl $USER/old-openssl
brew install openssl@1.0.2t

I get the errors below, which seems to be issue with Homebrew's incorrect mapping to the download URL, though the correct download URLs are extracted to the file -

/usr/local/Homebrew/Library/Taps/$USER/homebrew-old-openssl/Formula/openssl@1.0.2t.rb
==> Installing openssl@1.0.2t from $USER/old-openssl
==> Downloading https://homebrew.bintray.com/bottles-old-openssl/openssl@1.0.2t-1.0.2t.catalina.bottle.tar.gz
#=#=-#  #                                                                     
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "openssl@1.0.2t"
Download failed: https://homebrew.bintray.com/bottles-old-openssl/openssl@1.0.2t-1.0.2t.catalina.bottle.tar.gz

@kensoh
Copy link
Member

kensoh commented Dec 1, 2019

However, by tracing the Homebrew commit history, trying to brew install below_url -

https://raw.githubusercontent.com/Homebrew/homebrew-core/827dd8b591367bce6c8d128cd3c164f6319be2cd/Formula/openssl.rb

.. will lead to SHA checksum not matching error.

@kensoh
Copy link
Member

kensoh commented Dec 1, 2019

A solution that I found to be working, is manually update the checksum from the file generated by the brew extract method into the file in the GitHub URL above. Thus the file must be hosted somewhere else. A working solution seems to be below command. There are 2 uninstall commands to make sure any OpenSSL v1.1 is removed, and any dead v1.0 is removed, before installing v1.0.

brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

In the meantime, have raised an issue to Homebrew on why the recommended and supported method is not working and above hack has to be used - Homebrew/homebrew-core#47368


A Homebrew maintainer replied that the error on download failed is expected and the expectation is user install Xcode command line utilities in order to build from source. I'm evaluating and not likely to go via that way, because it adds additional dependencies and friction for users.

Until a better solution is found, my preference is using above self-hosted solution instead of building from source by users or building from source and maintaining the binaries ourselves.

@kensoh kensoh changed the title macOS OpenSSL version problem - Homebrew moved it from v1.0 to v1.1 macOS OpenSSL version problem - Homebrew moved it from v1.0 to v1.1 - initial fix Dec 1, 2019
@kensoh kensoh changed the title macOS OpenSSL version problem - Homebrew moved it from v1.0 to v1.1 - initial fix macOS OpenSSL version issue - Homebrew moved it from v1.0 to v1.1 - initial fix Dec 1, 2019
@kensoh
Copy link
Member

kensoh commented Dec 2, 2019

The solution seems to be running below commands in terminal. There are 2 uninstall commands to make sure any OpenSSL v1.1 is removed, and any dead v1.0 is removed, before installing v1.0.

The v1.0 Homebrew formula below is created by combining the SHA checksums of the brew extract method with the git commit history of OpenSSL v1.0 formula (specifically v1.0.2t).

brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

@muratcim
Copy link
Author

muratcim commented Dec 2, 2019

Hello, Ken,
Thank you for your clever solution.I tried it works

@jrreyes29
Copy link

The solution seems to be running below commands in terminal. There are 2 uninstall commands to make sure any OpenSSL v1.1 is removed, and any dead v1.0 is removed, before installing v1.0.

The v1.0 Homebrew formula below is created by combining the SHA checksums of the brew extract method with the git commit history of OpenSSL v1.0 formula (specifically v1.0.2t).

brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

I can't still install ruby , when I run rvm install 2.5.1 , rvm start to install openssl@1.1 I tried setting up the --with-openssl-lib=/opt/local/lib/openssl-1.0 --with-openssl-include=/opt/local/include/openssl-1.0 , and still nothing, do you know why rvm start to install the new openssl?

@kensoh
Copy link
Member

kensoh commented Dec 11, 2019

Hi @jrreyes29 this issue has nothing to do with rvm Ruby version manager. Above solution is only meant to solve the problem faced with using TagUI. Try raising issue at RVM GitHub or mailing list support for advice how to fix for rvm.

@kensoh
Copy link
Member

kensoh commented Dec 11, 2019

The solution above has been suggested for over a week without issues. Now giving feedback to Homebrew maintainer to do a final check on whether the solution is robust is sound -
Homebrew/homebrew-core#47368 (comment)

Hi @muratcim so far have you run into problems using the solution? If yes let me know, then I'll improve on the solution above. Otherwise the entry point to use on macOS would be blocked.

@muratcim
Copy link
Author

Hi Ken,
Yesterday I tried again on my mojave computer.I have not encountered any problems.
Open SSL version 1.0 was installed with homebrew

@kensoh
Copy link
Member

kensoh commented Dec 13, 2019

Thanks Murat for verifying and your feedback!

@kensoh
Copy link
Member

kensoh commented Dec 19, 2019

Closing issue while waiting for new inputs from users and feedback from Homebrew maintainer.

At the other project TagUI for Python, I'm running a free Starbucks promotion for users who raise unknown bugs. I replied there to you, pleasure to treat you and friend a drink!

tebelorg/RPA-Python#86

@vitechliu
Copy link

The solution seems to be running below commands in terminal. There are 2 uninstall commands to make sure any OpenSSL v1.1 is removed, and any dead v1.0 is removed, before installing v1.0.

The v1.0 Homebrew formula below is created by combining the SHA checksums of the brew extract method with the git commit history of OpenSSL v1.0 formula (specifically v1.0.2t).

brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

Thanks for this solution. Actually I know nothing about tagui but this really helps a lot of ruby/rails developers. Since homebrew removed openssl1.0 versions and easily gets it upgraded, many old rails project got crashed suddenly and we can't even find a formula to install the old versions... I searched everywhere and somehow only this issue helped..

@kensoh
Copy link
Member

kensoh commented Apr 7, 2020

Thanks @liuzirui1122 for dropping by and leaving a thank you note, appreciate it!

Yes it turns out that the 2 changes (macOS removing OpenSSL switching to LibreSSL, and Homebrew upgrading to OpenSSL v1.1 removing v1.0) are impacting many people and apps. You see this issue #86 here which tracks the solution. Every week there are over 3k unique visitors to that issue. Am glad that solving TagUI's problem, the solution indirectly is also helpful to others!

@OllisGit
Copy link

Thx @kensoh ,
but I need to added --ignore-dependencies and now everything is working fine, yeah!

@phil-blain
Copy link

phil-blain commented Apr 11, 2020

Hi @kensoh,

It seems that the recommended way to install older versions of a Homebrew formula (Homebrew/homebrew-core#46876) is not working.

When the recommended way using brew extract is used as follows -

brew uninstall openssl
brew tap-new $USER/old-openssl
brew extract --version=1.0.2t openssl $USER/old-openssl
brew install openssl@1.0.2t

I get the errors below, which seems to be issue with Homebrew's incorrect mapping to the download URL, though the correct download URLs are extracted to the file -

/usr/local/Homebrew/Library/Taps/$USER/homebrew-old-openssl/Formula/openssl@1.0.2t.rb
==> Installing openssl@1.0.2t from $USER/old-openssl
==> Downloading https://homebrew.bintray.com/bottles-old-openssl/openssl@1.0.2t-1.0.2t.catalina.bottle.tar.gz
#=#=-#  #                                                                     
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "openssl@1.0.2t"
Download failed: https://homebrew.bintray.com/bottles-old-openssl/openssl@1.0.2t-1.0.2t.catalina.bottle.tar.gz

just to let you know that this is a known brew extract issue : Homebrew/brew#6059

The workaround in that thread (fixing the extracted formula) should let you use the original bottle from Homebrew's bintray, which might be more robust then depending on a specific URL from another GitHub projet (https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb)


EDIT: also see this comment by one of Homebrew's maintainer saying brew installing straight from an URL "is insecure and will break."

@David3434
Copy link

@aryanagarwal15
I can't install openssl 1.0 on mac big sur,Could you help me again
thanks

`jacks@Jackss-MBP ~ % brew --version
Homebrew 2.5.6
Homebrew/homebrew-core (git revision a7549a; last commit 2020-10-15)
jacks@Jackss-MBP ~ % cd /usr/local/Homebrew/
jacks@Jackss-MBP Homebrew % git checkout 2.3.0
Note: switching to '2.3.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 77e09fc16 Merge pull request #7661 from MikeMcQuaid/man-url-install
jacks@Jackss-MBP Homebrew % HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

Traceback (most recent call last):
11: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in <main>' 10: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in require_relative'
9: from /usr/local/Homebrew/Library/Homebrew/global.rb:37:in <top (required)>' 8: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' 6: from /usr/local/Homebrew/Library/Homebrew/os.rb:3:in <top (required)>'
5: from /usr/local/Homebrew/Library/Homebrew/os.rb:21:in <module:OS>' 4: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:58:in prerelease?'
3: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in version' 2: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in new'
1: from /usr/local/Homebrew/Library/Homebrew/os/mac/version.rb:26:in initialize' /usr/local/Homebrew/Library/Homebrew/version.rb:368:in initialize': Version value must be a string; got a NilClass () (TypeError)
jacks@Jackss-MBP Homebrew %
`

@aryanagarwal15
Copy link

@David3434 I would suggest once purging brew and doing a fresh install in Big Sur.

Apple introduced Command Line Tools 12 in Mac Big Sur which is not working well with Homebrew. A fresh install may solve the issue.

Please note: Purging Homebrew can cause serious damage to many applications which depend on brew packages, make sure you know what you are doing here.

@phx135
Copy link

phx135 commented Oct 15, 2020

@aryanagarwal15
thanks for your reminder
I decide to roll back to mac 10.15
have a nice day

@David3434
Copy link

@aryanagarwal15
I found this
https://juejin.im/post/6871032600492769293
and I do install it successfuly in mac big sur ,but I think it's wrong
becuase here "perl ./Configure --prefix=/usr/local/Cellar/openssl/10.14.6" should be "perl ./Configure --prefix=/usr/local/Cellar/openssl/1.0.2t"
I don't how to change it,Could you help me
thanks

`jack@Jacks-MBP ~ % cd /usr/local/Homebrew/
jack@Jacks-MBP Homebrew % git checkout 2.3.0

Note: switching to '2.3.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 77e09fc16 Merge pull request #7661 from MikeMcQuaid/man-url-install
jack@Jacks-MBP Homebrew % HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
Warning: Calling Non-checksummed download of openssl formula file from an arbitrary URL is deprecated! Use 'brew extract' or 'brew create' and 'brew tap-new' to create a formula file in a tap on GitHub instead.
######################################################################## 100.0%-######################################################################## 100.0%
==> Downloading https://www.openssl.org/source/openssl-1.0.2t.tar.gz
Already downloaded: /Users/jack/Library/Caches/Homebrew/downloads/5d2da6a9ed1a20ef9d1b1418d79aa674cf5577b70ca1ce436fdaadfa04f0429c--openssl-1.0.2t.tar.gz
==> perl ./Configure --prefix=/usr/local/Cellar/openssl/10.14.6 --openssldir=/usr/local/etc/openssl no-ssl2 no-ssl3 no-zlib shared ena
==> make depend
==> make
==> make test
==> make install MANDIR=/usr/local/Cellar/openssl/10.14.6/share/man MANSUFFIX=ssl
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs

and run
/usr/local/opt/openssl/bin/c_rehash

openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have openssl first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc

For compilers to find openssl you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"

==> Summary
🍺 /usr/local/Cellar/openssl/10.14.6: 1,787 files, 12.5MB, built in 7 minutes 12 seconds
jack@Jacks-MBP Homebrew %

`

@alouanemed
Copy link

```shell
HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

Got the error below when run

HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

The err:

/usr/local/Homebrew/Library/Homebrew/version.rb:368:in initialize': Version value must be a string; got a NilClass () (TypeError)
`

@lenzirodrigo
Copy link

I just wanted to leave a detail summary (based on the comments above) on how to fix this issue at the current moment:

  1. First go to the local installation of homebrew
cd /usr/local/Homebrew/
  1. Homebrew 2.5 remove the option to install formulas directly from git repos so we need to checkout an older version
git checkout 2.3.0
  1. Install openssl latest 1.0.x version
HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
  1. Go back to current version of homebrew
git checkout -
  1. Tell brew to use the old version of openssl this way you can chose wich version to use if you have both intalled
brew switch openssl 1.0.2t

brew switch is not working anymore:

Error: Calling `brew switch` is disabled! Use `brew link` @-versioned formulae instead.

See:
Homebrew/discussions#339

@sjmog
Copy link

sjmog commented Jan 2, 2021

```shell
HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

Got the error below when run

HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

The err:

/usr/local/Homebrew/Library/Homebrew/version.rb:368:in initialize': Version value must be a string; got a NilClass () (TypeError)
`

@alouanemed I skipped this by just hard-coding val in /usr/local/Homebrew/Library/Homebrew/version.rb:368 (I set it to my OSX version, which is "11.0.1"). This allowed me to install the older openssl.

What I now cannot do is switch to using it since brew switch has been deprecated. Not sure how to link the older openssl.

@christovski
Copy link

The unfortunate reality is that Homebrew doesn't want to be a developer oriented package manager with version control, but a cowboy program installer & delivery method for the latest and greatest. See here:
Homebrew/discussions#339 (comment)

I guess the cost of maintaining brew switch was too high and it does not seem like you're ever going to get the same functionality you had before and should move away from expecting it from Homebrew.

As a work-around for this, it gets kinda lame if you just want it done.
For me, it was two steps. You have to add the path to your old SSL version to your $(PATH) in your terminal profile

export PATH="/usr/local/opt/openssl/bin:$PATH"

and then update the symlink in /usr/local/opt to point to this directory

ln -fh /path/to/your/openssl/installation /usr/local/opt/openssl

@kaldesigns
Copy link

What I now cannot do is switch to using it since brew switch has been deprecated. Not sure how to link the older openssl.

If it helps, I was able to use brew switch by omitting the final git checkout - (step 4) in @juan267's comment.

Besides that, his answer works a charm!

@yardz
Copy link

yardz commented Jan 29, 2021

@sjmog

@alouanemed I skipped this by just hard-coding val in /usr/local/Homebrew/Library/Homebrew/version.rb:368 (I set it to my OSX version, which is "11.0.1"). This allowed me to install the older openssl.
What I now cannot do is switch to using it since brew switch has been deprecated. Not sure how to link the older openssl.

I had the same problem, but then I run brew link openssl@1.0.2t
And I put this in .bash_profile:

export PATH="/usr/local/opt/openssl@1.0.2t/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl@1.0.2t/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.0.2t/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.0.2t/lib/pkgconfig"

@krzysztofcyran93
Copy link

Hi, I'm having the same issue.

Now I'm on the step:
user:~$ brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
Traceback (most recent call last):
brew extract or brew create and brew tap-new to create a formula file in a tap on GitHub instead.: Invalid usage: Non-checksummed download of openssl formula file from an arbitrary URL is unsupported! (UsageError)
brew extract or brew create and brew tap-new to create a formula file in a tap on GitHub instead.: Invalid usage: Non-checksummed download of openssl formula file from an arbitrary URL is unsupported! (UsageError)

Can someone please guide me here? Thanks

@pushkargaikwad
Copy link

Since I had to spend almost half a day to resolve this issue, here is my feedback and solution

  1. Big Sur with XCode is absolute mess. Apple need to be careful while making the dev tools live as it breaks lot of things.
  2. If you are on Big Sur, you will be on XCode 12 and you can not downgrade to 11.x version or command line tools.
  3. If you are on Big Sur, reinstalling brew will not help nor the above solutions. They will only work for XCode 11.x wit Command Line Tools 11.x

What worked for me was

CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.3.5

You can check the explanation here rbenv/ruby-build#1489 or search in Google with the above to find why it works. If you have a few years old dev environment and software, avoid upgrading to big sur.

@krzysztofcyran93
Copy link

I'm on Catalina...

@dchakro
Copy link

dchakro commented Feb 26, 2021

If you're getting errors like:

brew extract or brew create and brew tap-new to create a formula file in a tap on GitHub instead.: Invalid usage: Non-checksummed download of openssl formula file from an arbitrary URL is unsupported! (UsageError)

OR

Invalid usage: Installation of openssl from a GitHub commit URL is unsupported! brew extract openssl to a stable tap on GitHub instead. (UsageError)

I found this blog post which shows how to properly use brew extract, homebrew doesn't have good documentation for such use cases:

brew tap-new $USER/local-openssl
brew extract --version=1.0.2t openssl $USER/local-openssl

# Install from your freshly created local repo
brew install openssl@1.0.2t
# builds openssl (as no bottle is available)

Disclaimer: I'm not a user of TagUI, I use openssl-1.0.2t with rstudio-server.

@kensoh
Copy link
Member

kensoh commented Mar 7, 2021

Hi Guys, for TagUI we may have found the permanent solution. Note that this solution may not help for other projects.
Download directly from below link. After unzipping, put contents of unzipped folder into tagui/src/phantomjs folder.

https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip

Though above zip is PhantomJS v2.1.1 (same as TagUI packaged PJS), total file size for this zip after extraction is different. It might be Ariya, creator of PhantomJS, put in a fix already just to solve this headache with macOS/OpenSSL/Homebrew.

@jack338c
Copy link

rbenv/ruby-build#1489

I meet this issue too on my big sur,and I don't know how to install openssl
before openssl was working on my mac 10.15.7 by this post

@kensoh
Copy link
Member

kensoh commented Mar 16, 2021

Hi Guys, for TagUI we may have found the permanent solution. Note that this solution may not help for other projects.
Download directly from below link. After unzipping, put contents of unzipped folder into tagui/src/phantomjs folder.

https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip

Though above zip is PhantomJS v2.1.1 (same as TagUI packaged PJS), total file size for this zip after extraction is different. It might be Ariya, creator of PhantomJS, put in a fix already just to solve this headache with macOS/OpenSSL/Homebrew.

@jack338c
Copy link

Hi Guys, for TagUI we may have found the permanent solution. Note that this solution may not help for other projects.
Download directly from below link. After unzipping, put contents of unzipped folder into tagui/src/phantomjs folder.

https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip

Though above zip is PhantomJS v2.1.1 (same as TagUI packaged PJS), total file size for this zip after extraction is different. It might be Ariya, creator of PhantomJS, put in a fix already just to solve this headache with macOS/OpenSSL/Homebrew.

hello @kensoh
Does you mean I can try your way to install openssl-1.0.2t successfully on mac big sur ?
if yes,Could you please tell me the steps,I'm a new on macOS/OpenSSL/Homebrew

thanks for your help

@kensoh
Copy link
Member

kensoh commented Mar 25, 2021

Hi @jack338c for TagUI, the solution is found, it is to unzip the above PhantomJS v2.1.1 to replace the existing installation.

That should fix the issue for TagUI. However, for other apps having this error message, it'll require the respective apps vendors or maintainer to advise if overriding the OpenSSL version on your macOS works. The real permanent solution will be other apps providers upgrading their apps to support newer OpenSSL but it can take time.

@jack338c
Copy link

@kensoh
thanks for your detail explain.
anyway,I would try it later
🥂

@weallblind
Copy link

I just wanted to leave a detail summary (based on the comments above) on how to fix this issue at the current moment:

  1. First go to the local installation of homebrew
cd /usr/local/Homebrew/
  1. Homebrew 2.5 remove the option to install formulas directly from git repos so we need to checkout an older version
git checkout 2.3.0
  1. Install openssl latest 1.0.x version
HOMEBREW_NO_AUTO_UPDATE=1 brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
  1. Go back to current version of homebrew
git checkout -
  1. Tell brew to use the old version of openssl this way you can chose wich version to use if you have both intalled
brew switch openssl 1.0.2t

brew switch is not working anymore:

Error: Calling `brew switch` is disabled! Use `brew link` @-versioned formulae instead.

See:
Homebrew/discussions#339

Because of that, I ran 'git checkout -' as the last step. Then it worked

@kensoh
Copy link
Member

kensoh commented Jun 12, 2021

Thanks @weallblind for adding on! For TagUI at least, the solution has a permanent fix by using the updated PhantomJS package at below link. In the next TagUI release, this will be packaged as part of the release. For other apps having this issue, the solution will depends on whether the app creators have migrated to newer version of OpenSSL (which is the real permanent fix instead of using workarounds which can come with their own disadvantages)

#635 (comment)

@3minus1
Copy link

3minus1 commented Aug 6, 2021

For the RVM folks having trouble installing old Ruby versions on Apple M1, this might help
https://medium.com/@akforsn/installing-old-ruby-versions-on-apple-m1-step-by-step-guide-501bb893c843

@ari62
Copy link

ari62 commented Jan 2, 2022

I had this issue for using MariaDB. I am on a new Macbook Pro 2021 with M1 Max. I had to use x86 brew as described here:
https://medium.com/mkdir-awesome/how-to-install-x86-64-homebrew-packages-on-apple-m1-macbook-54ba295230f
Then dchakro's solution #635 (comment) and also create symlinks:

sudo mkdir -p /usr/local/opt/openssl/lib
sudo ln -s /usr/local/homebrew/opt/openssl@1.0.2t/lib/libssl.dylib /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
sudo ln -s /usr/local/homebrew/opt/openssl@1.0.2t/lib/libcrypto.dylib /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib

@isole
Copy link

isole commented Sep 15, 2023

I had this issue for using MariaDB. I am on a new Macbook Pro 2021 with M1 Max. I had to use x86 brew as described here: https://medium.com/mkdir-awesome/how-to-install-x86-64-homebrew-packages-on-apple-m1-macbook-54ba295230f Then dchakro's solution #635 (comment) and also create symlinks:

Stop putting information behind paywalls.... makes me sick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests