I want to install git with homebrew. I had MacPorts installed, which I removed from my iMac. I also removed homebrew completely, and reinstalled it with 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
. 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.
Now I wanted to install git with brew install git
. It fetched the content, and begins building 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. 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. Is this because of some broken things with MacPorts (I know, they don't like each other)? Or how can I fix that?
EDIT
I just found out, that when I'm running brew doctor
, I get this output:
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
. I searched my PATH var for any binary of git (or something else), but can't find anything.
I think this means, that somewhere there is git stuff left, and it conflicts with the new install. Am I right?