I know this question has already an answer that gives a solution. But I want to give you my two cents to help people to understand the problem. Getting same issue I've created a specific question. I got same problem, but only with PHPStorm. And exactly when I try to run test from the editor.
Swift Dyld Library Not Loaded Reason Image Not Found
dyld is the dynamic linker
solved dyld: Library not loaded, Reason: image not found Important: Please read. Library not loaded, Reason: image not found. This topic has been deleted. Feb 11, 2010 ld64 warning: indirect library libiomp5.dylib could not be loaded: file not found: libiomp5.dylib Or runtime error: dyld: Library not loaded: libiomp5.dylib Referenced from: @rpath/libmklintelthread.dylib Reason: image not found Trace/BPT trap Root Cause. MacOS BigSur Python3 - dyld: Library not loaded: trillionanswers Unladen Swallow. Reason: image not found Has anyone run into this issue before?


I sow that dyld was looking for /usr/local/lib/libpng15.15.dylib but inside my /usr/local/lib/ there was not. In that folder, I got libpng16.16.dylib.
Dyld Library Not Loaded Reason Image Not Found On Youtube
Thanks to a comment, I undestand that my /usr/bin/php was a pointer to php 5.5.8. Instead, ... /usr/local/bin/php was 5.5.14. PHPStorm worked with /usr/bin/php that is default configuration. When I run php via console, I run /urs/local/bin/php.
So, ... If you get some dyld error, maybe you have some wrong php configuration. That's the reason because

But I dont know why this do not solve the problem to me. Maybe because I have
Dyld Library Not Loaded Reason Image Not Found Online
dyld: library not loaded: /usr/local/opt x265 lib libx265 165 dylib, $ ffmpeg dyld: Library not loaded: /usr/local/opt/x265/lib/libx265.95.dylib Referenced from: /usr/local/bin/ffmpeg Reason: image not found Abort trap: 6 $ ffmpeg dyld: Library not loaded: /usr/local/opt/x265/lib/libx265.95.dylib Referenced from: /usr/local/bin/ffmpeg Reason: image not found Abort trap: 6