Unable to use dcmtk commands like dcmodify and dcmscale

368 Views Asked by At

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

brew info dcmtk

1

There are 1 best solutions below

3
On

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