2012-06-01 4 views
0

홈 브루를 사용하여 git를 설치하려면 this video을보고 있습니다. 이미 Homebrew가 설치되어 있습니다. 내가 가지고있는 문제는 homebrew를 사용하여 git를 설치하는 것이다. brew install git을 입력하고 특정 오류 메시지가 나타납니다.Homebrew를 사용하여 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 

어떻게 내가이 오류를 해결합니까? 도움이 필요합니다

+2

명령 줄 도구를 설치 했습니까? Xcode를 통해이 작업을 수행 할 수 있습니다. –

+0

내 문제는 ... 해결되었습니다 ... 감사 ... – lakesh

답변

5

필요한 헤더를 얻으려면 Xcode를 통해 명령 줄 도구를 설치해야합니다.

+0

git의 검색 경로를 지정하는 방법이 없습니까? '양조 '환경 변수? – ZhangChn

+0

명령 줄 도구는 XCode 4.4의 환경 설정/다운로드에서 사용할 수 있습니다. – boxed

+0

** XCode 5에서 이러한 명령을 어떻게 설치했는지 알 수 있습니까? ** https://dl.dropboxusercontent.com/u/62073194/Screen%20Shot%202013-12-14%20at%2022.17 만 표시됩니다. .44.png –

-1

나는 download it에게 제안합니다. 또한 github을 사용하는 경우 this page을 읽는 것이 좋습니다. 1 년 전 나는 이런 식으로 시작했다.