Macos 使用自制软件安装git有困难

Macos 使用自制软件安装git有困难,macos,git,homebrew,Macos,Git,Homebrew,我正在观看使用自制软件安装git。我已经安装了自制软件。我遇到的问题是使用自制软件安装git。我键入了brew install git,并显示了某些错误消息 错误消息: ./generate-cmdlist.sh > common-cmds.h+ && mv common-cmds.h+ common-cmds.h /usr/bin/xcrun clang -o hex.o -c -MF ./.depend/hex.o.d -MMD -MP -Os -w -pipe -m

我正在观看使用自制软件安装git。我已经安装了自制软件。我遇到的问题是使用自制软件安装git。我键入了brew install git,并显示了某些错误消息

错误消息:

./generate-cmdlist.sh > common-cmds.h+ && mv common-cmds.h+ common-cmds.h
/usr/bin/xcrun clang -o hex.o -c -MF ./.depend/hex.o.d -MMD -MP  -Os -w -pipe -march=native -Qunused-arguments -I. -DUSE_ST_TIMESPEC -DNO_GETTEXT  -DHAVE_DEV_TTY -DSHA1_HEADER='<openssl/sha.h>'  -DNO_MEMMEM  hex.c
/usr/bin/xcrun clang -o ident.o -c -MF ./.depend/ident.o.d -MMD -MP  -Os -w -pipe -march=native -Qunused-arguments -I. -DUSE_ST_TIMESPEC -DNO_GETTEXT  -DHAVE_DEV_TTY -DSHA1_HEADER='<openssl/sha.h>'  -DNO_MEMMEM  ident.c
/usr/bin/xcrun clang -o kwset.o -c -MF ./.depend/kwset.o.d -MMD -MP  -Os -w -pipe -march=native -Qunused-arguments -I. -DUSE_ST_TIMESPEC -DNO_GETTEXT  -DHAVE_DEV_TTY -DSHA1_HEADER='<openssl/sha.h>'  -DNO_MEMMEM  kwset.c
In file included from ident.c:8:
In file included from ./cache.h:4:
./git-compat-util.h:93:10: fatal error: 'unistd.h' file not found
#include <unistd.h>
         ^
In file included from hex.c:1:
In file included from ./cache.h:4:
./git-compat-util.h:93:10: fatal error: 'unistd.h' file not found
#include <unistd.h>
         ^
In file included from kwset.c:37:
In file included from ./cache.h:4:
./git-compat-util.h:93:10: fatal error: 'unistd.h' file not found
#include <unistd.h>
         ^
1 error generated.
make: *** [hex.o] Error 1
1 error generated.
make: *** Waiting for unfinished jobs....
make: *** [ident.o] Error 1
1 error generated.
make: *** [kwset.o] Error 1
==> Build Environment
CPU: quad-core 64-bit sandybridge
MacOS: 10.7.4-x86_64
Xcode: 4.3.2
CC: /usr/bin/xcrun clang => /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang

CXX: /usr/bin/xcrun clang++ => /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++

LD: /usr/bin/xcrun clang => /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang

CFLAGS: -Os -w -pipe -march=native -Qunused-arguments
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments
MAKEFLAGS: -j4
Error: Failed executing: make prefix=/usr/local/Cellar/git/1.7.10.3 CC=/usr/bin/xcrun\ clang CFLAGS=-Os\ -w\ -pipe\ -march=native\ -Qunused-arguments LDFLAGS= install (git.rb:49)
These existing issues may help you:
    https://github.com/mxcl/homebrew/issues/8643
    https://github.com/mxcl/homebrew/issues/9023
    https://github.com/mxcl/homebrew/issues/9618
    https://github.com/mxcl/homebrew/issues/10544
    https://github.com/mxcl/homebrew/issues/11481
    https://github.com/mxcl/homebrew/issues/12325
    https://github.com/mxcl/homebrew/issues/12344
    https://github.com/mxcl/homebrew/issues/12400
    https://github.com/mxcl/homebrew/issues/12478
Otherwise, please report the bug:
    https://github.com/mxcl/homebrew/wiki/reporting-bugs
/generate-cmdlist.sh>通用cmds.h+&&mv-common-cmds.h+通用cmds.h
/usr/bin/xcrun-clang-o hex.o-c-MF./.depend/hex.o.d-MMD-MP-Os-w-pipe-march=native-Qunused-arguments-I-DUSE_ST_TIMESPEC-DNO_GETTEXT-DHAVE_DEV_TTY-DSHA1_HEADER=''-DNO_MEMMEM hex.c
/usr/bin/xcrun-clang-o ident.o-c-MF./.depend/ident.o.d-MMD-MP-Os-w-pipe-march=本机使用的参数-I.-DUSE_ST_TIMESPEC-DNO_GETTEXT-DHAVE_DEV_TTY-DSHA1_头=“”-DNO_mem ident.c
/usr/bin/xcrun clang-o kwset.o-c-MF./.depend/kwset.o.d-MMD-MP-Os-w-pipe-march=native-qused-arguments-I-DUSE_ST_TIMESPEC-DNO_GETTEXT-DHAVE_DEV_TTY-DSHA1_HEADER=''-DNO_mem kwset.c
在标识c:8中包含的文件中:
在./cache.h:4中包含的文件中:
./git compat util.h:93:10:致命错误:“未找到unistd.h”文件
#包括
^
在hex.c:1中包含的文件中:
在./cache.h:4中包含的文件中:
./git compat util.h:93:10:致命错误:“未找到unistd.h”文件
#包括
^
在kwset.c:37中包含的文件中:
在./cache.h:4中包含的文件中:
./git compat util.h:93:10:致命错误:“未找到unistd.h”文件
#包括
^
生成1个错误。
make:**[hex.o]错误1
生成1个错误。
制作:**等待未完成的工作。。。。
make:**[ident.o]错误1
生成1个错误。
make:**[kwset.o]错误1
==>构建环境
CPU:四核64位sandybridge
MacOS:10.7.4-x86_64
Xcode:4.3.2
CC:/usr/bin/xcrun-clang=>/Applications/Xcode.app/Contents/Developer/toolschains/XcodeDefault.xctoolchain/usr/bin/clang
CXX:/usr/bin/xcrun clang++=>/Applications/Xcode.app/Contents/Developer/toolschains/XcodeDefault.xctoolschain/usr/bin/clang++
LD:/usr/bin/xcrun-clang=>/Applications/Xcode.app/Contents/Developer/toolschains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS:-Os-w-pipe-march=native-qused参数
CXXFLAGS:-Os-w-pipe-MARK=本机-QUUSED参数
MAKEFLAGS:-j4
错误:执行失败:make prefix=/usr/local/cillar/git/1.7.10.3 CC=/usr/bin/xcrun\clang CFLAGS=-Os \-w \-pipe \-march=native \-qused arguments LDFLAGS=install(git.rb:49)
这些现有问题可能有助于您:
https://github.com/mxcl/homebrew/issues/8643
https://github.com/mxcl/homebrew/issues/9023
https://github.com/mxcl/homebrew/issues/9618
https://github.com/mxcl/homebrew/issues/10544
https://github.com/mxcl/homebrew/issues/11481
https://github.com/mxcl/homebrew/issues/12325
https://github.com/mxcl/homebrew/issues/12344
https://github.com/mxcl/homebrew/issues/12400
https://github.com/mxcl/homebrew/issues/12478
否则,请报告错误:
https://github.com/mxcl/homebrew/wiki/reporting-bugs

如何解决此错误?需要帮助吗?我建议你去。另外,如果您使用github,我建议您只需阅读。一年前我就是这样开始的。

我建议你这样做。另外,如果您使用github,我建议您只需阅读。一年前我就是这样开始的。

您必须通过Xcode安装命令行工具才能获得所需的头。

您必须通过Xcode安装命令行工具才能获得所需的头。

您安装了命令行工具吗?你可以通过Xcode做到这一点。这就是我的问题所在。。。现在解决了。。。谢谢…您安装命令行工具了吗?你可以通过Xcode做到这一点。这就是我的问题所在。。。现在解决了。。。谢谢…是否有办法指定git的搜索路径,例如
brew
的环境变量?XCode 4.4中的“首选项/下载”下提供了命令行工具。您如何看到已在XCode 5中安装了这些命令?我只看到这没有办法指定git的搜索路径,例如,
brew
的环境变量?命令行工具在XCode 4.4的“首选项/下载”下提供。您如何看到您已在XCode 5中安装了这些命令?我只看到这个