After wasting a lot of time until finally finding a solution, I decided to share this with the community.
The problem:
convert
dyld: Library not loaded: /usr/local/opt/little-cms2/lib/liblcms2.2.dylib
Referenced from: /usr/local/bin/convert
Reason: image not found
Abort trap: 6
This kept happening even after updating ImageMagick:
brew upgrade imagemagick
so what's the solution?
Best Answer
Looking at the error, we identify the missing file:
The first step is to make sure that the library is actually existing:
So we can see that it does exist as
/usr/local/Cellar/little-cms2/2.9/lib/liblcms2.2.dylib
.We need to create a symbolic link that will make convert find the missing file. It is possible that the brew installation script was missing to do that.
The way to create a symlink goes like this:
So the final solution is simply this:
Let's verify:
Mission completed :)