Softaculous


Topic : Unable to load dynamic library libpq.5.dylib


Posted By: elvenour on February 23, 2015, 10:51 pm
Got warning like this

Warning: PHP Startup: Unable to load dynamic library '/Applications/AMPPS/php-5.6/lib/extensions/ext/pgsql.so' - dlopen(/Applications/AMPPS/php-5.6/lib/extensions/ext/pgsql.so, 9): Library not loaded: /Applications/AMPPS/extra/lib/libpq.5.dylib
  Referenced from: /Applications/AMPPS/php-5.6/lib/extensions/ext/pgsql.so
  Reason: no suitable image found.  Did find:
    /usr/lib/libpq.5.dylib: mach-o, but wrong architecture in Unknown on line 0

Posted By: pnosko on March 9, 2015, 6:07 pm | Post: 1
Did you get this solved? I am having the same issue.

Posted By: pnosko on March 10, 2015, 2:08 am | Post: 2
I copied these two files and two links from the version 2.8 download (http://files.ampps.com/AMPPS-2.8.dmg). Not sure if this is ideal, but my php -m is now "clean."

iMac:lib pnosko$ cd /Volumes/AMPPS/AMPPS/extra/lib
iMac:lib pnosko$ ls -l libpq*
-rwxr-xr-x  1 pnosko  staff  142636 Dec 24 07:48 libpq.5.6.dylib
lrwxr-xr-x  1 pnosko  staff      15 Dec 31 07:19 libpq.5.dylib -> libpq.5.6.dylib
-rw-r--r--  1 pnosko  staff  185400 Dec 24 07:48 libpq.a
lrwxr-xr-x  1 pnosko  staff      15 Dec 31 07:19 libpq.dylib -> libpq.5.6.dylib

Posted By: DaveyJake on March 12, 2015, 5:28 am | Post: 3
I got it! Looking at the error message and the code it finally made sense.

In terminal, run this command:

Code

sudo ln -s /Applications/AMPPS/extra/lib/libpq.5.6.dylib /usr/lib/libpq.5.dylib


Everything will then work without issue.

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.