Вопрос

I'm trying get Homebrew working with Xcode Command Line Tools, and they seem to be having it out with each other... In the words of Rodney King, "Can't we all just get along?"

For some background, when I first got my Mac about a year ago, I had no idea what I was doing. I was also using macports, which was, as the Homebrew website seems to be cognizant, driving me to become a raging alcoholic. As a result, my /usr/local directory got wayyy f-ed up. Eventually, gcc and g++ stopped working, and a lot of other things were breaking. So I did a clean install of OS X, and I want my shiny new installation to stay a little more organized.

Now, I've installed Apple's Command Line Tools, and all the binaries/libraries/etc have ended up in /usr/local. That's fine, but then I try to install homebrew, and it's also putting everything in the /usr/local/ directory. When I run the command

brew doctor

I get the following output (actually, this is just a snippet, but it captures the general spirit of what Homebrew is telling me):

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
    /usr/local/lib/libatomic.a
    /usr/local/lib/libgfortran.a
    /usr/local/lib/libgmp.a
    /usr/local/lib/libgomp.a
    /usr/local/lib/libitm.a
    /usr/local/lib/libmpc.a
    /usr/local/lib/libmpfr.a
    /usr/local/lib/libquadmath.a
    /usr/local/lib/libssp.a
    /usr/local/lib/libssp_nonshared.a
    /usr/local/lib/libstdc++.a
    /usr/local/lib/libsupc++.a

I thought I might place Homebrew in a different directory; however, the Homebrew documentation specifically warned against this. They say:

"Do yourself a favor and install to /usr/local. Some things may not build when installed elsewhere. One of the reasons Homebrew just works relative to the competition is because we recommend installing to /usr/local. Pick another prefix at your peril!"

The whole point is that I don't want to bother with micro-managing every package I install, and I don't want my filesystem to become an ungodly mess either. Anyone have any suggestions? Do I move command line tools to a different directory and add this to my $PATH? Any tips would be much appreciated.

Это было полезно?

Решение

It's a warning, and the message says why. If you later want to install a Homebrew formula that installs one of those files, it will fail, because it will decline to overwrite those files, and then you will have to delete those files, as the message says.

Specifically, those files appear to belong to an installation of gcc. You might want to research or try to remember why that was installed there. It's probably OK to just delete them and install gcc from Homebrew if you need it.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top