[英]Brew install git fails
I want to install git with homebrew. 我想用自制软件安装git。 I had MacPorts installed, which I removed from my iMac. 我安装了MacPorts,我从iMac中删除了它。 I also removed homebrew completely, and reinstalled it with ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
. 我也完全删除了自制软件,并用ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
重新安装了它。
After I ran brew doctor
I had to delete (I only moved them) some libs inside /usr/local/lib
. 在我运行brew doctor
我不得不删除(我只是移动它们) /usr/local/lib
一些库。 After that I fixed the $PATH
var in my .profile
, so that the /usr/local/bin
and /usr/local/sbin
are overwriting the normal bin dir. 之后我修复了我的.profile
的$PATH
var,以便/usr/local/bin
和/usr/local/sbin
覆盖正常的bin目录。
Now I wanted to install git with brew install git
. 现在我想用brew install git
。 It fetched the content, and begins building git. 它获取了内容,并开始构建git。 But during the build, it fails with the message 但是在构建期间,它会失败并显示消息
~$ brew install git
spo==> Downloading http://git-core.googlecode.com/files/git-1.7.12.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/git-1.7.12.4.tar.gz
==> make prefix=/usr/local/Cellar/git/1.7.12.4 CC=/usr/bin/gcc-4.2 CFLAGS=-Os -w -pipe -march=core2 -msse4.1 -mmacosx-version
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [git-credential-store] Error 1
make: *** Waiting for unfinished jobs....
Writing perl.mak for Git
Error: git did not build
Logs: /Users/23tux/Library/Logs/Homebrew/git/
Help: https://github.com/mxcl/homebrew/wiki/troubleshooting
https://github.com/mxcl/homebrew/issues/11481
https://github.com/mxcl/homebrew/issues/14423
https://github.com/mxcl/homebrew/issues/14585
I looked into the /Users/23tux/Library/Logs/Homebrew/git/
and it says, that there are undefined symbols. 我查看了/Users/23tux/Library/Logs/Homebrew/git/
,它说,有未定义的符号。 Here is the output: 这是输出:
/usr/bin/gcc-4.2 -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 -I. -DPRECOMPOSE_UNICODE -DUSE_ST_TIMESPEC -DNO_GETTEXT -DHAVE_DEV_TTY -DSHA1_HEADER='<openssl/sha.h>' -DNO_MEMMEM -DSHELL_PATH='"/bin/sh"' -o git-credential-store -L/usr/local/lib credential-store.o libgit.a xdiff/lib.a -lz -liconv -lcrypto -lssl
Undefined symbols:
"_strbuf_addstr_urlencode", referenced from:
_main in credential-store.o
_main in credential-store.o
_main in credential-store.o
_main in credential-store.o
"_strbuf_getline", referenced from:
_parse_credential_file in credential-store.o
"_strbuf_release", referenced from:
_parse_credential_file in credential-store.o
_main in credential-store.o
"_credential_clear", referenced from:
_parse_credential_file in credential-store.o
"_usage_with_options", referenced from:
_main in credential-store.o
"_credential_from_url", referenced from:
_parse_credential_file in credential-store.o
"_credential_read", referenced from:
_main in credential-store.o
"_commit_lock_file", referenced from:
_rewrite_credential_file in credential-store.o
"_die_errno", referenced from:
_parse_credential_file in credential-store.o
_rewrite_credential_file in credential-store.o
"_credential_match", referenced from:
_parse_credential_file in credential-store.o
"_strbuf_slopbuf", referenced from:
_parse_credential_file in credential-store.o
_main in credential-store.o
"_expand_user_path", referenced from:
_main in credential-store.o
"_parse_options", referenced from:
_main in credential-store.o
"_write_or_die", referenced from:
_print_line in credential-store.o
"_die", referenced from:
_main in credential-store.o
"_strbuf_addf", referenced from:
_main in credential-store.o
"_hold_lock_file_for_update", referenced from:
_rewrite_credential_file in credential-store.o
"_strbuf_grow", referenced from:
_print_line in credential-store.o
_main in credential-store.o
_main in credential-store.o
_main in credential-store.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [git-credential-store] Error 1
make: *** Waiting for unfinished jobs....
Writing perl.mak for Git
HOMEBREW_VERSION: 0.9.3
HEAD: (none)
CPU: dual-core 64-bit penryn
OS X: 10.6.8-i386
Xcode: 3.2.6
X11: 2.3.6 => /usr/X11
(the output is much longer, I only included the last few lines, where the error happened). (输出更长,我只包括最后几行,错误发生的地方)。
I googled a lot, but can't find any solution. 我google了很多,但找不到任何解决方案。 Is this because of some broken things with MacPorts (I know, they don't like each other)? 这是因为MacPorts的一些破碎的东西(我知道,他们彼此不喜欢)? Or how can I fix that? 或者我该如何解决这个问题?
EDIT 编辑
I just found out, that when I'm running brew doctor
, I get this output: 我刚刚发现,当我正在运行brew doctor
,我得到了这个输出:
You must: brew install git
You must: brew install git
You must: brew install git
Warning: An outdated version of Git was detected in your PATH.
Git 1.6.6 or newer is required to perform checkouts over HTTP from GitHub.
Please upgrade: brew upgrade git
When I run brew upgrade git
I get Error: git not installed
. 当我运行brew upgrade git
我得到Error: git not installed
。 I searched my PATH var for any binary of git (or something else), but can't find anything. 我搜索了我的PATH var以获取任何二进制git(或其他东西),但找不到任何东西。
I think this means, that somewhere there is git stuff left, and it conflicts with the new install. 我认为这意味着,某个地方还有git东西,它与新安装相冲突。 Am I right? 我对吗?
I couldn't figure out how to install git with homebrew in that case. 在这种情况下,我无法弄清楚如何使用自制软件安装git。 'Cause I didn't want to waste so much time, I installed the whole rvm, ruby, git stuff with the Rails Installer from here http://railsinstaller.org/ . 因为我不想浪费那么多时间,我从这里http://railsinstaller.org/安装了Rails安装程序的整个rvm,ruby,git。 Then it worked with homebrew 然后它与自制软件一起使用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.