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

I had very hard time with this error :

Reason: Incompatible library version: php requires version 44.0.0 or later, but libpng16.16.dylib provides version 42.0.0 Trace/BPT trap: 6

I did all the above things with brew and much more ... but it wasn't this !

Check where your library is :

sudo find / -name libpng16.16.dylib

In my case here was the relevant result :

  • /usr/local/lib/libpng16.16.dylib
  • /usr/local/Cellar/libpng/1.6.34/lib/libpng16.16.dylib
  • /Applications/MAMP/Library/lib/libpng16.16.dylib
  • /opt/X11/lib/libpng16.16.dylib

So as I'm a MAMP user it turn out that the error appeared while I was trying to update from PHP 7.1.0 to 7.1.8 (last MAMP php available) as Symfony4 require at least 7.1.3

At the end I instaled the new version of MAMP and it worked (4.1 to 4.2). However be carreful when you're doing this, you need to backup first everything in your MAMP/htdoc folder. Also keep a backup of your custom compiled php version than can live in MAMP/bin/php. (In my case I had a special PHP version with Oracle drivers).

Also if you configured the MAMP php version to be your CLI php interpreter, you'll need to update the PATH in your .bash_profile

It should look something like this :

export PATH=/Applications/MAMP/bin/php/php7.1.8/bin:$PATH

I hope this can help.

Examples related to php

I am receiving warning in Facebook Application using PHP SDK Pass PDO prepared statement to variables Parse error: syntax error, unexpected [ Preg_match backtrack error Removing "http://" from a string How do I hide the PHP explode delimiter from submitted form results? Problems with installation of Google App Engine SDK for php in OS X Laravel 4 with Sentry 2 add user to a group on Registration php & mysql query not echoing in html with tags? How do I show a message in the foreach loop?

Examples related to osx-mavericks

Composer could not find a composer.json pip installation /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory Where is my m2 folder on Mac OS X Mavericks How to set JAVA_HOME environment variable on Mac OS X 10.9? dyld: Library not loaded: /usr/local/lib/libpng16.16.dylib with anything php related Xcode is not currently available from the Software Update server Maven not found in Mac OSX mavericks Genymotion, "Unable to load VirtualBox engine." on Mavericks. VBox is setup correctly App can't be opened because it is from an unidentified developer Error executing command 'ant' on Mac OS X 10.9 Mavericks when building for Android with PhoneGap/Cordova

Examples related to libpng

libpng warning: iCCP: known incorrect sRGB profile dyld: Library not loaded: /usr/local/lib/libpng16.16.dylib with anything php related

Examples related to dyld

Reason: no suitable image found dyld: Library not loaded: @rpath/libswiftCore.dylib OS X Framework Library not loaded: 'Image not found' registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later iOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 Beta Broken references in Virtualenvs dyld: Library not loaded: /usr/local/lib/libpng16.16.dylib with anything php related dyld: Library not loaded ... Reason: Image not found