繁体   English   中英

Brew安装git失败

[英]Brew install git fails

我想用自制软件安装git。 我安装了MacPorts,我从iMac中删除了它。 我也完全删除了自制软件,并用ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"重新安装了它。

在我运行brew doctor我不得不删除(我只是移动它们) /usr/local/lib一些库。 之后我修复了我的.profile$PATH var,以便/usr/local/bin/usr/local/sbin覆盖正常的bin目录。

现在我想用brew install git 它获取了内容,并开始构建git。 但是在构建期间,它会失败并显示消息

~$ 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

我查看了/Users/23tux/Library/Logs/Homebrew/git/ ,它说,有未定义的符号。 这是输出:

/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

(输出更长,我只包括最后几行,错误发生的地方)。

我google了很多,但找不到任何解决方案。 这是因为MacPorts的一些破碎的东西(我知道,他们彼此不喜欢)? 或者我该如何解决这个问题?

编辑

我刚刚发现,当我正在运行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

当我运行brew upgrade git我得到Error: git not installed 我搜索了我的PATH var以获取任何二进制git(或其他东西),但找不到任何东西。

我认为这意味着,某个地方还有git东西,它与新安装相冲突。 我对吗?

在这种情况下,我无法弄清楚如何使用自制软件安装git。 因为我不想浪费那么多时间,我从这里http://railsinstaller.org/安装了Rails安装程序的整个rvm,ruby,git。 然后它与自制软件一起使用

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM