dyld: Symbol not found: _OPENSSL_init_ssl - macos

I just installed ffsend and wget via homebrew on my MacOS (Mojave 10.14.6), and when I run the command
ffsend upload some_file.tgz
or
wget some_url some_file.tgz
I get the following:
dyld: lazy symbol binding failed: Symbol not found: _OPENSSL_init_ssl
Referenced from: /usr/local/bin/ffsend Expected in:
/usr/local/opt/openssl#1.1/lib/libssl.1.1.dylib
dyld: Symbol not found: _OPENSSL_init_ssl Referenced from:
/usr/local/bin/ffsend Expected in:
/usr/local/opt/openssl#1.1/lib/libssl.1.1.dylib
Abort trap: 6
I know I've had some bugs with Open SSL previously, but I have no idea of how to tackle this problem.
Thanks

The problem was due to a conflict between versions of OpenSSL. Some programs (wget, ffsend) needed the latest version of OpenSSL, while some other programs (not distributed) needed an older version of OpenSSL, namely 1.0.2.
I found the solution here: after reinstalling openssl via brew reinstall openssl#1.1, I used brew switch openssl 1.0.2q.
This way I can use both programs that need the latest version and those that use the older one.

Related

Unable to use dcmtk commands like dcmodify and dcmscale

System: M1 MacBook air
I created a duplicate terminal that runs with rosetta 2 for installing dcmtk since it's not available for apple chips yet. In the duplicate terminal, I was able to install dcmtk successfully.
On running dcmodify, I get
dyld: Library not loaded: #rpath/libdcmdata.16.dylib
Referenced from: /usr/local/homebrew/bin/dcmodify
Reason: image not found
zsh: abort dcmodify
dcmscale also gives throws a similar error.
dyld: Library not loaded: #rpath/libdcmimage.16.dylib
Referenced from: /usr/local/homebrew/bin/dcmscale
Reason: image not found
zsh: abort dcmscale
How do I fix these errors?
Edit-1: Reinstalling DCMTK made no difference. The error still persists.
Edit-2: I have attached the logs for brew info dcmtk
Since you are using the terminal with rosetta 2, try adding export PATH="/usr/local/homebrew/bin:$PATH" in ~/.bashrc file
If this doesn't work, add export PATH="/usr/local/homebrew/bin:$PATH" in ~/.zshrc file
Adding these paths should work

dyld: Library not loaded: #rpath/libnetcdf.13.dylib ...Reason: image not found : GMT on MacOS Big Sur

I installed GMT4 from the source code on my Mac machine. Now, when I try using any command (e.g. pscoast) from GMT, It results into following error:
"dyld: Library not loaded: #rpath/libnetcdf.13.dylib
Referenced from: **********/GMT4.5.16/bin/pscoast
Reason: image not found
Abort trap: 6"
How to solve this issue?
As suggested here, the problem might be due to the fact that GMT expects libnetcdf to be built with different options than it is actually built on your machine. I had a similar problem when downloading ncview. My libnetcdf was built with conda-forge so installing ncview with conda-forgehelped.
If you're using conda as well, you can type conda list in a shell to see what was used to build the packages, and then maybe conda remove GMT to install it

mac ports openssl 1.0.2g disables SSLv2 which is required by mongodb

Updating openssl to 1.0.2g using mac ports disables the SSLv2 due to CVE-2016-0800
The problem is mongodb built using mac ports requires this SSLv2
dyld: Symbol not found: _SSLv2_client_method
Referenced from: /opt/local/bin/mongod
Expected in: /opt/local/lib/libssl.1.0.0.dylib
in /opt/local/bin/mongod
Trace/BPT trap: 5
The solution according to CVE-2016-0800 is to define enable-ssl2 but even then they mention the following:
SSL_CTX_clear_options(ctx, SSL_OP_NO_SSLv2);
or
SSL_clear_options(ssl, SSL_OP_NO_SSLv2);
which I'm not sure if mongodb follows the directive.
Anyone has a reference for this on a mongodb issue?
Is there a simple fix on the mongodb code for this?
mongodb #3.2.3_1 solved the issue

How to load libraries for gnuplot?

I installed gnuplot on macos via:
$ make install,
whenever I run
$ gnuplot,
I get the following error message:
dyld: Library not loaded: libpng15.15.dylib
Referenced from: /usr/local/bin/gnuplot
Reason: image not found
Trace/BPT trap: 5
I have absolutely no idea whats going on. please help.
Updating Xquartz to the latest version solved it. Still have no idea what was going on

ImageMagick on Mac OSX Snow Leopard. Is there any way to get it to compile and run?

It seems that I have more trouble getting standard Unix things to run on Snow Leopard than any other platform--including Windows cygwin
For the past couple of days, I've been trying to get ImageMagick to run on Snow Leopard.
The most obvious way, Mac Ports, fails:
tppllc-Mac-Pro:ImageMagick-sl swirsky$ sudo port install imagemagick
---> Computing dependencies for p5-locale-gettext
---> Configuring p5-locale-gettext
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_perl_p5-locale-gettext/work/gettext-1.05" && /opt/local/bin/perl Makefile.PL INSTALLDIRS=vendor " returned error 2
Command output: checking for gettext... no
checking for gettext in -I/opt/local/include -arch i386 -L/opt/local/lib -lintl...gettext function not found. Please install libintl at Makefile.PL line 18.
no
Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade xorg-libXt failed
Before reporting a bug, first run the command again with the -d flag to get complete output.
tppllc-Mac-Pro:ImageMagick-sl swirsky$
Not wanting to spend another two days figuring out why my libintl doesn't have a "gettext" function, I tried a different route: the script mentioned here: http://github.com/masterkain/ImageMagick-sl
This script downloads and installs an ImageMagic independently of MacPorts issues
tppllc-Mac-Pro:ImageMagick-sl swirsky$ /usr/local/bin/convert
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
Referenced from: /opt/local/lib/libfontconfig.1.dylib
Reason: Incompatible library version: libfontconfig.1.dylib requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
Trace/BPT trap
It downloads everything and compiles fine, but fails when I try to run it, with the message above.
So now I'm two steps away from ImageMagick, trying to get a newer libiconv on my machine.
I downloaded the latest libiconv, compiled and built it. I put the resulting library in /opt/local/lib, and I still get the same error message:
tppllc-Mac-Pro:.libs swirsky$ sudo mv libiconv.2.dylib /opt/local/lib/libiconv.2.dylib
tppllc-Mac-Pro:.libs swirsky$ convert
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
Referenced from: /opt/local/lib/libfontconfig.1.dylib
Reason: Incompatible library version: libfontconfig.1.dylib requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
Trace/BPT trap
Now here's something interesting. The error message shows it's looking in /opt/local/lib/libiconv.2.dylib.
otools -L shows that this does implement 8.0.0:
tppllc-Mac-Pro:.libs swirsky$ otool -L /opt/local/lib/libiconv.2.dylib
/opt/local/lib/libiconv.2.dylib:
/usr/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
tppllc-Mac-Pro:.libs swirsky$
And, for good measure, I set the DYLD_LIBRARY_PATH to make sure this directory is the one for dynamic libraries.
So even though I do have a library that provides 8.0.0, it's being seen as 7.0.0! Any ideas why this would happen?
So here's my question: Is it possible to get ImageMagick to run on OSX Snow Leopard? Are there any binary distributions that have static libraries baked in so I don't have to worry about these issue/
This worked for me:
sudo brew install imagemagick
You may also try the ImageMagick install script located here:
http://github.com/masterkain/ImageMagick-sl
It helped me a lot. May be needed to change some library versions inside the script.
I've seen this exact error with this exact library in multiple situations. It was, in every case, an instance where either the individual or an script they were using was setting the DYLD_LIBRARY_PATH variable.
Make sure this variable is not being set as it overrides loading the explicitly linked libraries with those at that path.
If the DYLD_* must be set, use the more sane DYLD_FALLBACK_LIBRARY_PATH. Which will attempt to load the explicitly linked libraries first, then fallback to the user declared ones.
I did notice on your initial build that it was not finding the gettext library in macports. So make sure those are installed.
My google showed up a few hits, and the first or second one had a link to the binary.
I was finally able to get my "macports" installation consistent enough to get imagemagick installed and running. I had to manually delete my /opt/local/ directores where the files lived, and clean out some other dependencies.
It seems that the dynamic linker is pulling in the system libiconv.2.dylib (which has compatibility version 7.0.0). Without seeing your entire build process it's hard to know for sure why this is, but I'm suspicious of your libiconv build; note that in the following failure:
tppllc-Mac-Pro:.libs swirsky$ otool -L /opt/local/lib/libiconv.2.dylib
/opt/local/lib/libiconv.2.dylib:
/usr/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
your libiconv.2.dylib seems to think that its install path is /usr/local/lib, not /opt/local/lib. This probably why the dynamic linker isn't finding it; it's looking for it in /usr/local/lib, not finding it, and falling back on the system library in /usr/lib. Try setting the install path for your libiconv.2.dylib so that it's load commands tell the linker to look for it in /opt/local/lib, and that may resolve the issue.
I had the same problem, and solved it by uninstalling then reinstalling libiconv using Macports. Then everything works fine (I also have /opt/local/lib/ as the first entry in my DYLD_LIBRARY_PATH variable)
Strange. I'm pretty happy with my macports - and everything is compiled without errors. I can only advice - use macports.
ImageMagick #6.6.9-9_0+graphviz+hdri+jpeg2+mpeg+perl+q16+rsvg+wmf (active)

Resources