Re: dll load problem [message #179367 is a reply to message #179350] |
Sat, 13 October 2012 00:40 |
Denis McMahon
Messages: 634 Registered: September 2010
Karma:
|
Senior Member |
|
|
On Fri, 12 Oct 2012 14:07:49 +0200, Philipp Kraus wrote:
> Hello,
>
> I run on a shell execution my local git client and get the error:
>
> dyld: lazy symbol binding failed: Symbol not found: _iconv_open
> Referenced from: /usr/local/git/bin/git Expected in:
> /Applications/MAMP/Library/lib/libiconv.2.dylib
>
> The git client is linked to the system libraries and works, but if I run
> it from my PHP script I get the error above. The script runs under OSX
> with PHP 5.4.4.
>
> (How) Can I change the search path of dynamic libraries? I think the
> correct library that should be use is under /usr/lib/libiconv.2.dylib
This post contains suggested OS shell commands. I have no idea if they'll
work on your system in the form presented, or if they'll trash your
system completely. Use these commands at your own risk. I might have
accidentally slipped a couple of commands in that will erase your hard
disk, so check all the suggested commands before you run them.
Is it possible you have two versions of the library installed? One that
has the relevant symbols (in /usr/lib/libiconv.2.dylib) and one that
doesn't (in /Applications/MAMP/Library/lib/libiconv.2.dylib), and that
the one that the php shell is picking up isn't the same one as when you
run git from the OS yourself?
The quick fix - create a link from where it's looking for the library to
where the library really is:
open a command shell
Check that "/usr/lib/libiconv.2.dylib" exists:
$ ls /usr/lib/libiconv.2.dylib
Check that "/Applications/MAMP/Library/lib/libiconv.2.dylib" doesn't
exist:
$ls /Applications/MAMP/Library/lib/libiconv.2.dylib
if ("/Applications/MAMP/Library/lib/libiconv.2.dylib" exists):
See if it's the same size, date, md5sum[1] as "/usr/lib/libiconv.2.dylib"
[1] You're expected to know how to do this, if you don't, you shouldn't
have opened the command shell in the first place!
Decide what to do next yourself. You might decide to copy one version of
the library over the other one, or delete one and then follow the "else"
branch below, or do something else - but it's up to you to figure out how
to solve the problem. I'd probably rename "/Applications/MAMP/Library/lib/
libiconv.2.dylib" to something like "/Applications/MAMP/Library/lib/
libiconv.2.dylib.old" and then create the link below.
else:
Create a symlink from the non-existant file to the existing one:
$ ln -s /usr/lib/libiconv.2.dylib /Applications/MAMP/Library/lib/
libiconv.2.dylib
endif;
Note as these are commands you'd be issuing in the shell, you might need
to su root or something (I'm not that familiar with OSX) to get the
permissions needed.
Rgds
Denis McMahon
|
|
|