Unable to use dcmtk commands like dcmodify and dcmscale - macos

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

Related

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

dyld: Symbol not found: _OPENSSL_init_ssl

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.

libproj not loaded while installing sumo on macOS

I was going through the Flow installation and when I typed sumo --version into the terminal I got the following error message:
dyld: Library not loaded: /usr/local/opt/proj/lib/libproj.13.dylib
Referenced from: /Users/apple/sumo_binaries/bin/sumo
Reason: image not found
I've tried reinstalling sumo but the problem persisted.
How can I solve this issue?
I've found a fix for the problem.
Type the following into the terminal:
ln -s /usr/local/opt/proj/lib/libproj.15.dylib /usr/local/opt/proj/lib/libproj.13.dylib
Open up the directory mentioned above and make sure both libraries show (even if one of them is a shortcut) and rerun the sumo installation.
Note: you may have to change the paths depending on where your libproj.15.dylib is located.

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

gfortran library not loaded when I try to run command

I'm trying to run a simple fortran code I wrote following an intro to fortran tutorial using Mac Terminal. When I try to run it I get the library not loaded. When I try to run the library it refers to it says "cannot execute binary file." What can I do to run this command? Thank you
Here is the text from my terminal:
hntvlan569:work Abdullah$ ./fact
dyld: Library not loaded: /usr/local/lib/libgfortran.3.dylib
Referenced from: /Users/Abdullah/work/./fact
Reason: image not found
Trace/BPT trap: 5
I wrote the executable on emacs. It appears I hadn't properly installed all the required software before attempting to run it. I found this website useful and after following all the instructions there my problem was solved: https://wiki.helsinki.fi/display/HUGG/Installing+the+GNU+compilers+on+Mac+OS+X

Resources