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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

dyld: Library not loaded error on macOS (OpenSSL missing) #86

Closed
kensoh opened this issue Mar 8, 2018 · 59 comments
Closed

dyld: Library not loaded error on macOS (OpenSSL missing) #86

kensoh opened this issue Mar 8, 2018 · 59 comments
Labels

Comments

@kensoh
Copy link
Member

@kensoh kensoh commented Mar 8, 2018

Welcome to TagUI GitHub repository 馃! TagUI is a command-line tool for RPA (to automate digital processes). There's a Python package built on TagUI called RPA for Python 馃悕 with a similar issue, but it's automatically fixed with below solution during initialisation.

This error is happening because macOS decided to drop OpenSSL and switched to LibreSSL. Furthermore, macOS Homebrew switched from OpenSSL v.1.0 to v1.1, breaking many other apps that are dependent on OpenSSL v1.0. The solution below may or may not work for other apps, be sure to check with their respective maintainers to confirm.

===== P R O B L E M =====

I've come across a feedback from a macOS user that below error happens when running TagUI.

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib

===== S O L U T I O N =====

There is a new dependency in newer versions of macOS. To fix the error do the following. It installs Homebrew (a package manager for macOS) and installs OpenSSL for https connections. There are 2 uninstall commands below to first remove OpenSSL v1.1, then remove any dead OpenSSL v1.0, before installing a custom OpenSSL v1.0 formula which works without having to build with Xcode.

If you don't have Homebrew or don't know what is it

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew upgrade
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb


Or if you already have Homebrew installed

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


===== O N E 鈥侺 A S T 鈥俆 H I N G =====

If you encounter problems using brew, try the solution from @mrtoadsc near bottom of this page.

@kensoh kensoh added the bug label Mar 8, 2018
@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Mar 8, 2018

Closing this issue for time being, and keeping a lookout for more occurrences or clean macOS laptops to identify patterns for root cause.

@kensoh kensoh closed this Mar 8, 2018
@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Mar 8, 2018

internal reference - this issue by other open-source project mentions that in macOS 10.13, it switches away from OpenSSL to LibreSSL - envoyproxy/envoy#2395

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Mar 9, 2018

another datapoint the same user fixes the issue with just the following without doing the linking step (he already has Homebrew) so the first line /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" is not needed.

brew update && brew upgrade
brew install openssl

another datapoint where a macos user encounters the same issue. it could be the 10.13 release change in behavior around OpenSSL.

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Mar 10, 2018

There is a new dependency possibly in newer versions of macOS. To fix the error do the following. It installs Homebrew (a package manager for macOS) and installs OpenSSL for https connections.

If you do not have Homebrew or don't know what is Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew upgrade
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb


Or if you already have Homebrew installed

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


If you encounter problems using brew, try the solution from @mrtoadsc near bottom of this page.

kensoh added a commit that referenced this issue Mar 10, 2018
@jameschanck

This comment has been minimized.

Copy link

@jameschanck jameschanck commented Apr 17, 2018

Jamess-MacBook-Pro:src jameschan$ ./tagui samples/try1 chrome
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /Users/jameschan/Downloads/tagui/src/phantomjs/bin/phantomjs
Reason: image not found

i am reading the above can fix but can explain what is wrong?? Thanks

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Apr 17, 2018

Hi @jameschanck thanks for sharing that above fix works. From my understanding macOS Sierra is switching away from OpenSSL to LibreSSL as the tool to access secure connections.

The above installs and enables OpenSSL on your macOS so that the part of TagUI (PhantomJS engine) that automates and connects to https:// websites can continue working.

@jameschanck

This comment has been minimized.

Copy link

@jameschanck jameschanck commented Apr 17, 2018

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Apr 17, 2018

I see.. This step-by-step tutorial may be useful. Or this video talk at FOSSASIA with demo of TagUI features. Yes TagUI has integration with Sikuli to control UI interactions (including desktop applications) using visual recognition and OCR. But some automation scenarios needs greater control than this.

For example clicking on cell J10 on an Excel spreadsheet. Doing that by specifying a cell image to click on won't find the right cell. Open-source apps such as AHK or Roro can have automation scripts to do such actions. Integrating with them will let TagUI do more types of automation.

Now the run step can be used to call AHK or Roro, thinking if there is a way to make it even easier.

@jameschanck

This comment has been minimized.

Copy link

@jameschanck jameschanck commented Apr 18, 2018

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Apr 20, 2018

Posting as a separate issue as the discussion is not related to this macOS SSL issue - #141

@ntoghrama

This comment has been minimized.

Copy link

@ntoghrama ntoghrama commented Feb 21, 2019

hi! I do not have homebrew but am trying to install it for MacOS Mojave 10.14.3.

Running:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Returns:

dyld: Library not loaded: @rpath/libssl.1.0.0.dylib Referenced from: /Users/natasha/anaconda3/lib/libssh2.1.dylib Reason: image not found

does anyone have about idea of why this does not work?

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Feb 24, 2019

Thanks for heads-up! Strange, I'm running same version of macOS - Mojave 10.14.3. Tried the same command to install on both normal terminal and Anaconda environment without issues.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

This is probably an environment issue but can't find related issues on homebrew github or discourse. Reopening this issue for the time being to see if anyone else can add on their findings.

@kensoh kensoh reopened this Feb 24, 2019
@kensoh kensoh added general and removed bug labels Feb 24, 2019
@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Feb 25, 2019

Adding on, it looks like there is conflict with Anaconda on your system preventing installation of Homebrew, try changing PATH in ~/.profile and see if that helps - https://discourse.brew.sh/t/ssh-problem-with-install-homebrew/4052

Closing issue for now as the above installation conflict is with Anaconda / Homebrew. Another reference on Homebrew installation issue with Anaconda.

@enhering

This comment has been minimized.

Copy link

@enhering enhering commented Aug 6, 2019

Hi. I'm running Mac OS 10.12.6 (sierra).

After installing mysql connector cpp 8.0.17 this same issue happened:ENH-MBP:build enhering$ ./FJH
dyld: Library not loaded: libssl.1.0.0.dylib
Referenced from: /usr/local/mysql-connector-c++-8.0.17/lib64/libmysqlcppconn.7.dylib
Reason: image not found
Abort trap: 6
ENH-MBP:build enhering$

I already had openssl installed by brew. And I was using MySQL connector cpp 1.x.x before this without problems.

The MySQL connector cpp 8.0.17 package was downloaded from mysql website. They provide binaries for many distributions.

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Aug 7, 2019

I'm not sure what is the above command FJH that triggers the error message. Do you mean you have problems running MySQL? If yes, you should raise the issue on MySQL issues or community forum page.

If you mean an existing TagUI script now cannot work after installing MySQL, you can try the following to see if it works, by removing and installing OpenSSL again.

brew update && brew upgrade
brew remove openssl
brew install openssl
@mrtoadsc

This comment has been minimized.

Copy link

@mrtoadsc mrtoadsc commented Sep 18, 2019

I stumbled across this thread while trying to resolve my own dyld: Library not loaded libssl issue. In more recent versions of MacOS, they introduced a feature called System Integrity Protection which prevents packages from writing to protected directories like /bin or /usr/lib. Even commands like brew link openssl --force will not work.

You must disable SIP in order to copy/link the open ssl libraries to the correct destination, You can do this by going into Recovery Mode (reboot, Cmd-R at the Apple logo), open a Terminal and execute the command csrutil disable, reboot and then you can copy the files into /usr/lib. This is what worked for me. Perhaps you can copy the libssl, libcrypto files to /usr/loca/lib - which doesn't require disabling SIP - but I didn't try that.

Good luck!

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Sep 18, 2019

Thanks Mark for sharing your findings!

Adding on a short article which users can also refer to if they encounter the issue -
https://www.imore.com/how-turn-system-integrity-protection-macos

And a longer article with the technical background and screenshots of the steps -
https://www.macworld.com/article/2986118/how-to-modify-system-integrity-protection-in-el-capitan.html

@hectorb802

This comment has been minimized.

Copy link

@hectorb802 hectorb802 commented Sep 29, 2019

I stumbled across this thread while trying to resolve my own dyld: Library not loaded libssl issue. In more recent versions of MacOS, they introduced a feature called System Integrity Protection which prevents packages from writing to protected directories like /bin or /usr/lib. Even commands like brew link openssl --force will not work.

You must disable SIP in order to copy/link the open ssl libraries to the correct destination, You can do this by going into Recovery Mode (reboot, Cmd-R at the Apple logo), open a Terminal and execute the command csrutil disable, reboot and then you can copy the files into /usr/lib. This is what worked for me. Perhaps you can copy the libssl, libcrypto files to /usr/loca/lib - which doesn't require disabling SIP - but I didn't try that.

Good luck!

HI, I am new in the forum, and I am experiencing the exact same issuea after updating to MaOS Mojave, I already Had tunred of System Integrity Protection But can you please tell me where can I get those files that we need to copy to /usr/lib folder.. I am new using MacOS and any advice would be helpful in order to fix this issue..
Thanks in advance..

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Sep 29, 2019

Hi Hector, after you turned off SIP, you can restart computer and run below commands from terminal. After installation and verifying TagUI works, then restart computer to turn SIP back to the default on.

If you do not have Homebrew or don't know what is Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew upgrade
brew install openssl

Or if you already have Homebrew installed

brew update && brew upgrade
brew install openssl
@hectorb802

This comment has been minimized.

Copy link

@hectorb802 hectorb802 commented Sep 30, 2019

Hi Hector, after you turned off SIP, you can restart computer and run below commands from terminal. After installation and verifying TagUI works, then restart computer to turn SIP back to the default on.

If you do not have Homebrew or don't know what is Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew upgrade
brew install openssl

Or if you already have Homebrew installed

brew update && brew upgrade
brew install openssl

Thanks for your answer Kensoh,

I tried your recommendation and I am still getting the same errors I have several weeks trying uninstallig and reistalling

I have pasted the error just in case you have a chance to check it.. Thanks again.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/utils/autoreload.py", line 77, in raise_last_exception
raise _exception[1]
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/core/management/init.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/contrib/auth/models.py", line 2, in
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/contrib/auth/base_user.py", line 47, in
class AbstractBaseUser(models.Model):
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/db/models/base.py", line 117, in new
new_class.add_to_class('_meta', Options(meta, app_label))
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/db/models/base.py", line 321, in add_to_class
value.contribute_to_class(cls, name)
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/db/models/options.py", line 204, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/db/init.py", line 28, in getattr
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/db/utils.py", line 201, in getitem
backend = load_backend(db['ENGINE'])
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/db/utils.py", line 110, in load_backend
return import_module('%s.base' % backend_name)
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/django/db/backends/postgresql/base.py", line 24, in
raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: dlopen(/Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/psycopg2/_psycopg.cpython-37m-darwin.so, 2): Library not loaded: libssl.1.1.dylib
Referenced from: /Users/Sindira/Documents/ezt/eztve/lib/python3.7/site-packages/psycopg2/_psycopg.cpython-37m-darwin.so
Reason: image not found

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Sep 30, 2019

It looks like above error messages have nothing to do with TagUI. They are for a Python related Django project or psycopg2 package.

I'm afraid I can't help here, you'll have to check with the respective Python projects GitHub issues page for advice, as the solution to above error that you are facing may be different from what TagUI users are facing.

The error TagUI users are facing comes from the PhantomJS engine trying to access OpenSSL, it's a different source of error message compared to the project that you are using above, which has nothing to do with TagUI.

@RuudvdvNB

This comment has been minimized.

Copy link

@RuudvdvNB RuudvdvNB commented Dec 9, 2019

Here's what worked for me

  1. I did what @mrtoadsc had suggested in #86 (comment)
  2. I modified the solution of @kensoh #86 (comment)
brew update && brew upgrade
brew uninstall --ignore-dependencies openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

Hope this helps

Update:
Keep in mind, that I had to use --ignore-dependencies flag, because I have other packages installed that depend on OpenSSL.

For what it's worth, i had to use brew intall openssl to make it work.

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Dec 9, 2019

I assume @RuudvdvNB is referring to another tool with dependency to OpenSSL. brew install openssl may work for some other tools that uses OpenSSL v1.1. For TagUI and other tools relying on OpenSSL v1.0 it requires a mod, that's why I host above modified brew formula to facilitate.

Without a modified solution, will need users to make their own builds using Xcode, which I think is too much user friction. This issue has more details on that, when Homebrew recently removed OpenSSL v1.0 and replaced with v1.1 - #635

@MartinVincent

This comment has been minimized.

Copy link

@MartinVincent MartinVincent commented Dec 23, 2019

FYI: In my case, the issue was stemming from a conflict betwen OSX (10.11) ssh installed version and a newly installed (via Brew) openssh client. {solution was simply to uninstall openssh: brew uninstall openssh}

@brandonsturgeon

This comment has been minimized.

Copy link

@brandonsturgeon brandonsturgeon commented Jan 3, 2020

Should I ignore warnings about extra dependencies?

i.e.

Error: Refusing to uninstall /usr/local/Cellar/openssl@1.1/1.1.1d
because it is required by asciinema, cairo, ffmpeg, freetds, glib, gnupg, gnutls, harfbuzz, imagemagick, libass, libevent, libheif, mysql, python, rbenv, rtmpdump, ruby, shared-mime-info, tmux, unbound, vim and w3m, which are currently installed.
You can override this and force removal with:
  brew uninstall --ignore-dependencies openssl
@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Jan 3, 2020

It looks like you have some developer tools installed on your laptop, and that OpenSSL v1.1 is also presented, installed through Homebrew. If the reason for uninstalling v1.1 to have v1.0 in order to use TagUI, then yes you can try uninstalling to ignore the dependencies to get v1.0. However, if v1.0 has issues later on for some of those apps above, then you'll have to uninstall v1.0 to put back v1.1 for those apps to work.

Adding on, a permanent fix for this issue is being worked on now. First, PhantomJS has recently started active development, I'm checking with the maintainer on this to see if he can update to using v1.1 OpenSSL as the standard or better still, switch to LibreSSL which comes with macOS. Secondly, a POC on migrating TagUI's execution engine to Node.js is being explored to see if that makes sense for the project and its users.

@szhuzenefits

This comment has been minimized.

Copy link

@szhuzenefits szhuzenefits commented Jan 6, 2020

    from django.db.backends.mysql.base import DatabaseOperations as _DatabaseOperations
  File "/Users/szhu/Documents/yourPeople3/venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 18, in <module>
    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/szhu/Documents/yourPeople3/venv/lib/python2.7/site-packages/_mysql.so, 2): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/opt/mysql/lib/libmysqlclient.20.dylib
  Reason: image not found
unable to load app 0 (mountpoint='') (callable not found or import error)

see this error, any suggestions? uninstall openssl and reinstall doesn't solve this problem

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Jan 7, 2020

It looks like the app you are using is still having a dependency for OpenSSL v1.0. You can try -

  1. ideally, if it's possible to get an updated version of the app that uses OpenSSL v1.1
  2. check with the maintainer of the project (Django?) for advice what's the right approach
  3. as a last resort, try the following self-hosted formula which helps to install OpenSSL v1.0 without user having to use XCode to build for macOS (the official method from Homebrew requires user to build (details here on why the self-hosted formula is used - #635)
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb


Note that above solution and this thread is to solve a problem faced by users using TagUI tool. Though it may solve similar problems faced by users of other apps, it may not. Do check the docs, issues or mailing list of the app you are using to see if they have found and recommended an official solution for their apps around this OpenSSL issue due to change in macOS (to switch to LibreSSL) and then later on a change in Homebrew (to move from OpenSSL v1.0 to v1.1).

@szhuzenefits

This comment has been minimized.

Copy link

@szhuzenefits szhuzenefits commented Jan 7, 2020

It looks like the app you are using is still having a dependency for OpenSSL v1.0. You can try -

  1. ideally, if it's possible to get an updated version of the app that uses OpenSSL v1.1
  2. check with the maintainer of the project (Django?) for advice what's the right approach
  3. as a last resort, try the following self-hosted formula which helps to install OpenSSL v1.0 without user having to use XCode to build for macOS (the official method from Homebrew requires user to build (details here on why the self-hosted formula is used - #635)
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb


Note that above solution and this thread is to solve a problem faced by users using TagUI tool. Though it may solve similar problems faced by users of other apps, it may not. Do check the docs, issues or mailing list of the app you are using to see if they have found and recommended an official solution for their apps around this OpenSSL issue due to change in macOS (to switch to LibreSSL) and then later on a change in Homebrew (to move from OpenSSL v1.0 to v1.1).

I uninstalled the 1.1 version and installed the v1.0.0 version fixed this issue, seems like my django need a 1.0.0 version but I have 1.1 previously, thank you!

@emimarz

This comment has been minimized.

Copy link

@emimarz emimarz commented Jan 16, 2020

if you install the current version and after that copy the old version to the folder actually works
brew install // install 1.1 version
download libcrypto.1.0.0.dylib and libssl.1.0.0.dylib
so move them to /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
and /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
I know that is not an elegant way but if it works is better than nothing
ah I search but for example this repository have that mentioned files
https://github.com/zoom/zoom-sdk-macos/tree/master/ZoomSDK

@frakman1

This comment has been minimized.

Copy link

@frakman1 frakman1 commented Jan 20, 2020

@kensoh

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

Why do you uninstall openssl twice?

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Jan 20, 2020

@frakman1 the goal for this particular project is to make OpenSSL v1.0 available on macOS. Using uninstall twice is a more foolproof 1-liner to make sure any v1.1 is removed, followed by any dead and not working v1.0 is removed (which can happen and block the installation), before doing the installation from custom formula. More details in this thread - #635 (comment)

@kelek

This comment has been minimized.

Copy link

@kelek kelek commented Jan 21, 2020

Just running brew update && brew upgrade worked for me; no need to uninstall/reinstall OpenSSL.

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Jan 21, 2020

(referring to kelek's comment above)

That will install OpenSSL v1.1 which is the version that Homebrew uses since its Nov release. But there are many apps which are still dependent on OpenSSL v1.0, and will not work if there is v1.1 installed instead of v1.0.

There is an official brew method to create personal tap and use extract function to install past releases, but that requires user to have XCode and build OpenSSL v1.0. So I create and host the custom formula above for users to get v1.0 without having to install and build using XCode.

@rruiz858

This comment has been minimized.

Copy link

@rruiz858 rruiz858 commented Jan 25, 2020

Welcome to TagUI GitHub repository! TagUI is a command-line tool for digital process automation (RPA). This error is happening because macOS decided to drop OpenSSL and switched to LibreSSL. There are many other apps having this error, the solution below may or may not work for other apps, be sure to check with their respective maintainers to confirm.

===== P R O B L E M =====

I've come across a feedback from a macOS user that below error happens when running TagUI.

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib

===== S O L U T I O N =====

There is a new dependency in newer versions of macOS. To fix the error do the following. It installs Homebrew (a package manager for macOS) and installs OpenSSL for https connections.

If you do not have Homebrew or don't know what is Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew upgrade
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb


Or if you already have Homebrew installed

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


===== N O T E =====

If you encounter problems using brew, try the solution from @mrtoadsc near bottom of this page.

OMG. I love you.

@capihacendado

This comment has been minimized.

Copy link

@capihacendado capihacendado commented Jan 29, 2020

Thanks so much for this solution. It saves my day in order to use mongodb commands in the terminal.
But now, that I want to use jupyter notebook, I realized that my python is dependent of the version 1.1

image

Any solution in order to not be switching among the versions?

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Jan 29, 2020

I'm afraid I have not heard of any solution to have 2 different versions of OpenSSL running on the same Mac computer. I know that sucks, especially in situations where you want to use both software at the same time but can't. Will look forward to hearing from other experts how that can be done.

@capihacendado

This comment has been minimized.

Copy link

@capihacendado capihacendado commented Jan 29, 2020

I'm afraid I have not heard of any solution to have 2 different versions of OpenSSL running on the same Mac computer. I know that sucks, especially in situations where you want to use both software at the same time but can't. Will look forward to hearing from other experts how that can be done.

thank you so much!

@LearningChanging

This comment has been minimized.

Copy link

@LearningChanging LearningChanging commented Jan 29, 2020

Here's what worked for me

  1. I did what @mrtoadsc had suggested in #86 (comment)
  2. I modified the solution of @kensoh #86 (comment)
brew update && brew upgrade
brew uninstall --ignore-dependencies openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

Hope this helps
Update:
Keep in mind, that I had to use --ignore-dependencies flag, because I have other packages installed that depend on OpenSSL.

For what it's worth, i had to use brew intall openssl to make it work.

Thanks

@jjoskey

This comment has been minimized.

Copy link

@jjoskey jjoskey commented Feb 3, 2020

thanks for help )

@mascardoso

This comment has been minimized.

Copy link

@mascardoso mascardoso commented Feb 5, 2020

You only need to update wget.
brew update && brew upgrade is enough.

@tonycodes

This comment has been minimized.

Copy link

@tonycodes tonycodes commented Feb 6, 2020

For me i had to run brew reinstall php and i'm back up and running

@benhorns

This comment has been minimized.

Copy link

@benhorns benhorns commented Feb 12, 2020

Welcome to TagUI GitHub repository! TagUI is a command-line tool for digital process automation (RPA). This error is happening because macOS decided to drop OpenSSL and switched to LibreSSL. There are many other apps having this error, the solution below may or may not work for other apps, be sure to check with their respective maintainers to confirm.
===== P R O B L E M =====
I've come across a feedback from a macOS user that below error happens when running TagUI.

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib

===== S O L U T I O N =====
There is a new dependency in newer versions of macOS. To fix the error do the following. It installs Homebrew (a package manager for macOS) and installs OpenSSL for https connections.
If you do not have Homebrew or don't know what is Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew upgrade
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb


Or if you already have Homebrew installed

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


===== N O T E =====
If you encounter problems using brew, try the solution from @mrtoadsc near bottom of this page.

OMG. I love you.

I stumbled across this thread while trying to resolve my own dyld: Library not loaded libssl issue. In more recent versions of MacOS, they introduced a feature called System Integrity Protection which prevents packages from writing to protected directories like /bin or /usr/lib. Even commands like brew link openssl --force will not work.

You must disable SIP in order to copy/link the open ssl libraries to the correct destination, You can do this by going into Recovery Mode (reboot, Cmd-R at the Apple logo), open a Terminal and execute the command csrutil disable, reboot and then you can copy the files into /usr/lib. This is what worked for me. Perhaps you can copy the libssl, libcrypto files to /usr/loca/lib - which doesn't require disabling SIP - but I didn't try that.

Good luck!

I have tried all of the above and none of this is working for me :(((

I am trying to do the installation detailed here: https://www.pyimagesearch.com/2018/08/17/install-opencv-4-on-macos/

when I submit this command in terminal: sudo python3 get-pip.py

I get this error:

WARNING: The directory '/Users/aislinnmcnamara/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
ERROR: No matching distribution found for pip
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping

anyone please help!?

@kensoh

This comment has been minimized.

Copy link
Member Author

@kensoh kensoh commented Feb 12, 2020

I'm afraid issue in above post has nothing to do with this thread. It looks like you are having problem installing pip. Try to see if you can install Python from here https://www.python.org/downloads/ as Python would already come installed with pip, no need to do installation separately from command line. If that doesn't work, you can raise an issue at Python's PIP repo page to see if anyone has encountered this problem and has a solution - https://github.com/pypa/pip

@capihacendado

This comment has been minimized.

Copy link

@capihacendado capihacendado commented Feb 14, 2020

I'm afraid I have not heard of any solution to have 2 different versions of OpenSSL running on the same Mac computer. I know that sucks, especially in situations where you want to use both software at the same time but can't. Will look forward to hearing from other experts how that can be done.

After getting tired of being switching among versions, I have decided to look for one solution to my situation. I wanted to reinstall mongodb in order to see if mongo was truly dependent of openssl 1.0.2 or it was just my version of mongodb. I was surprised when I found that Homebrew has delete mongodb from its core formulas since mongo was migrated to a non open-source license.
So, following this thread in stackOverflow I was able to install mongodb again using tap https://stackoverflow.com/questions/57856809/installing-mongodb-with-homebrew
So I run this command in my terminal

brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-community

and voila, I can used mongo's terminal commands with openssl 1.1

@hydrosquall

This comment has been minimized.

Copy link

@hydrosquall hydrosquall commented Feb 17, 2020

I resolved the issue by switching my active OpenSSL version after installing the custom tap provided above

brew switch openssl 1.0.2t

Source: https://stackoverflow.com/questions/59006602/dyld-library-not-loaded-usr-local-opt-openssl-lib-libssl-1-0-0-dylib

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

Successfully merging a pull request may close this issue.

None yet
You can鈥檛 perform that action at this time.