如何修复git for OSX上的权限/链接路径
运行OSX 10.4(约塞米蒂) 当我以用户身份运行“git{command}”时出现此错误:如何修复git for OSX上的权限/链接路径,git,macos,Git,Macos,运行OSX 10.4(约塞米蒂) 当我以用户身份运行“git{command}”时出现此错误: dyld: Symbol not found: __cg_jpeg_resync_to_restart Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO Expected in: /opt/local/lib/libJPEG.dylib in /System/Library/Fra
dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /opt/local/lib/libJPEG.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
git: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
git: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch
运行“sudogit{command}”时,一切正常。不知道怎么了。我猜这是某种安装问题、链接问题或权限问题。有人知道发生了什么/如何修复吗
更新:
在下面列出的帖子之后,我能够在不作为root的情况下进行git调用,但仍然遇到链接错误:
Cloning into 'master'...
dyld: lazy symbol binding failed: Symbol not found: _iconv_open
Referenced from: /usr/local/bin/git
Expected in: /opt/local/lib/libiconv.2.dylib
dyld: Symbol not found: _iconv_open
Referenced from: /usr/local/bin/git
Expected in: /opt/local/lib/libiconv.2.dylib
这里的链接似乎有什么大问题,有人知道发生了什么吗?它看起来像
/usr/local/bin
出现在/usr/bin
之前的$PATH
中,所以/usr/local/bin/git
在/usr/bin/git
之前(sudo
将$PATH
重置为一个预定义值,该值通常不包含/usr/local
,这就是它工作的原因)。尝试看看/usr/bin/git
是否对您更有效
也就是说,/usr/local/bin/git
似乎已损坏。它似乎是由第三方软件包管理器安装的(我猜是MacPorts)
我建议将其删除(
sudo-port-fp uninstall git
,尽管我不熟悉MacPorts,并从其文档中删除了该命令行,因此它可能无法工作)或者尝试重新安装它以解决您遇到的问题。似乎与2013年提出的问题非常相似:谢谢!按照说明操作,但遇到新错误,似乎与链接仍然相关。。。。