-1

I am getting this error, and I don't know if there's a way to update libiconv.2.dylib to version 8.0.0 ?

dyld: Library not loaded: /Applications/MAMP/Library/lib/libiconv.2.dylib
Referenced from: /Applications/MAMP/Library/lib/libxml2.2.dylib
Reason: Incompatible library version: libxml2.2.dylib requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
halfer
  • 19,824
  • 17
  • 99
  • 186
ragulka
  • 4,312
  • 7
  • 48
  • 73
  • Are you getting this error from the downloaded binary, or the one you build from source? – halfer Jun 09 '12 at 11:59
  • It's from the downloaded Library. As far as I understand the problem occurs because when I'm running from command line, i'm using my mac's built-in server, when i'm running from PHP, i'm using MAMP's server and there seem to be some libraries missing or mismatching... – ragulka Jun 09 '12 at 15:40
  • Ah right, so the downloaded version of `wkhtmltopdf` works OK from the command line? Also: did you build the source version successfully? What happens if you run that from the command line? What happens if you run that from PHP? – halfer Jun 09 '12 at 17:14
  • Yes, the downloaded version works OK from command line. No, I did not build a version from source as I know that the latest version has bugs that the 0.10.0 rc2 does not have – ragulka Jun 12 '12 at 18:33
  • But you explicitly state in your question that you "have tried building it from source"? If this is wrong, please update your question text. (I have an idea what might be wrong, will add it as an answer). – halfer Jun 12 '12 at 22:24
  • Hey, yes I tried building from source, but that version did not even work from CLI :) Anyway, I have resolved this by dumping MAMP and using the built-in PHP and Apache in OSX – ragulka Jun 20 '12 at 10:45

1 Answers1

0

I have a theory that if you are running a binary and it works fine from the CLI but not from PHP, then you need to set your environment variables correctly. In general, commands are mostly sensitive to differences in PATH and HOME, which are set very minimally inside a PHP system call. Try copying these from your command line to your PHP env by using the answer to this question.

Community
  • 1
  • 1
halfer
  • 19,824
  • 17
  • 99
  • 186