dyld: Library not loaded: /usr/local/lib/libpng16.16.dylib with anything php related

后端 未结 11 1016
攒了一身酷
攒了一身酷 2020-11-28 05:01

Using any php application results in:

dyld: Library not loaded: /usr/local/lib/libpng15.15.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
         


        
11条回答
  •  生来不讨喜
    2020-11-28 05:18

    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.

    dyld is the dynamic linker

    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.

    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

    $ brew update && brew upgrade
    $ brew reinstall php55
    

    But I dont know why this do not solve the problem to me. Maybe because I have

提交回复
热议问题