Git 错误:dyld:懒惰的符号绑定失败:找不到符号:_iconv_open
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19455727/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git Error: dyld: lazy symbol binding failed: Symbol not found: _iconv_open
提问by JustNeph
I was trying to fix up my .bashrc
on a new mac with some aliases I had and I had made a .bash_profile
to try to load up the .bashrc
when the terminal was opened. However, it has been giving me this error every time I try to use a git
command.
我试图.bashrc
在一台新的 mac 上修复我的一些别名,我已经做了一个.bash_profile
尝试.bashrc
在终端打开时加载。但是,每次我尝试使用git
命令时,它都会给我这个错误。
git status
dyld: lazy symbol binding failed: Symbol not found: _iconv_open
Referenced from: /usr/bin/git
Expected in: /opt/local/lib/libiconv.2.dylib
dyld: Symbol not found: _iconv_open
Referenced from: /usr/bin/git
Expected in: /opt/local/lib/libiconv.2.dylib
Trace/BPT trap: 5
I deleted the .bash_profile
and even reverted back the .bashrc
but still no good. Any ideas?
我删除了.bash_profile
,甚至恢复了,.bashrc
但仍然没有好处。有任何想法吗?
Side Note: I have looked at Git > dyld: lazy symbol binding failed: Symbol not found: _iconv_openbut his solution doesn't seem to work for me as I have no bash_profile at all now.
旁注:我看过Git > dyld: lazy symbol binding failed: Symbol not found: _iconv_open但他的解决方案似乎对我不起作用,因为我现在根本没有 bash_profile 。
采纳答案by JustNeph
Coworker figured it out for my situation.
同事根据我的情况解决了这个问题。
Create a file ~/.bash_profile
and in it put
创建一个文件~/.bash_profile
并将其放入
PATH=/usr/local/bin:$PATH:/opt/local/bin
export PATH
That seemed to fix it. Seems the issue was with the path.
这似乎解决了它。似乎问题出在路径上。
回答by Kiki Jewell
Note, I just answered a similar issue. Bottom line is there is a broken version of git
installed on your computer in /usr/local/git/bin
. Uninstall that one to be certain you won't get this problem. (I had fixed it on the command line but not in PyCharm -- annoying!)
注意,我刚刚回答了一个类似的问题。最重要的是git
,您的计算机上安装了/usr/local/git/bin
. 卸载那个以确保您不会遇到此问题。(我已经在命令行中修复了它,但没有在 PyCharm 中修复它——烦人!)
More specific info in my answer here:
我在这里的回答中有更具体的信息:
Git commands not working in Mac terminal: "dyld: Symbol not found: ___strlcpy_chk" error