1

I am trying to upgrade to PHP 5.6 from PHP 5.5. Then I receive the following error on curl install:

Executing post-install script /tmp/5.6-10.10-frontenddev-post-install
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /opt/local/bin/grep
  Reason: Incompatible library version: grep requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
Restarting Apache

I have:

  1. No environment variables set for dylib
  2. otool -L /opt/local/lib/libiconv.2.dylib returns: /opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
  3. port installed returns libiconv @1.14_0 (active), the latest version.

It looks like:

otool -DL /usr/lib/libiconv.2.dylib

returns:

/usr/lib/libiconv.2.dylib:
    /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

So the system version is being accessed by PHP install. How can I make it point to the local lib version?

Trying sudo port -n upgrade --force libiconv for now..

Union find
  • 7,759
  • 13
  • 60
  • 111
  • How did you check whether you had any `DLYD_*` variables set? If you're on El Capitan, `/usr/bin/env` and `/usr/bin/printenv` now longer show those variables due to System Integrity Protection. Try `(set -o posix; set) | grep DYLD` in a shell instead. Additionally, it is possible the the post-install script sets `DYLD_LIBRARY_PATH=/usr/lib`, which would explain this behavior. – neverpanic Jan 03 '16 at 18:58
  • It specifically says `Library not loaded: /opt/local/lib/libiconv.2.dylib` so it's not looking at the system version. If this problem is still outstanding, what does the post-install script look like? If not, go ahead and delete or self-answer the question. – miken32 Feb 03 '16 at 00:23

0 Answers0