Tag Info

Hot answers tagged

97

I decided to look this up and found that there is an issue. The issue is closed but it is not possible to simply run brew update because you will still get the same error. So here is what you need to do: cd /usr/local/Library git pull origin master This will upgrade your homebrew and you can use brew again. If you installed Homebrew as a non-root user, ...


69

Binaries in /{,usr/}{,s}bin/ should not usually be replaced with other files. Other programs expect them to be the versions that came with OS X, and they are replaced by OS upgrades. After running brew install bash, you can change the default shell safely by: Adding /usr/local/bin/bash to /etc/shells Running chsh -s /usr/local/bin/bash. Settings in ...


69

BOOM! I found the proper way to do this: Get brew if you don't have by doing: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" After that: brew update brew upgrade osxfuse brew upgrade ntfs-3g sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.orig sudo ln -s /usr/local/sbin/mount_ntfs /sbin/mount_ntfs brew info ...


53

Definitely Homebrew. I started with Fink, then switched to MacPorts (happier), then Homebrew (much, much happier). These are my reasons for using each (a pro list if you will): Fink Apt-based - feel right at home if you come from a Debian-based environment Binary packages - packages are available as binaries so no long compile times. Practically though ...


44

brew list Running brew list will show a list of all your installed Homebrew packages.


44

Thanks everyone for helpful answers. In my case adding export PATH="/usr/local/bin:$PATH" in ~/.bash_profile solved the problem.


40

Is this considered bad? I thought one of the advantages of using /usr/local/ for your installs was that you don't need sudo. But clearly we do. Homebrew, by default, sets itself up for single-user access to /usr/local. So you need to open up the permissions on the directory tree for it to be administered by more than one person. People don't need to ...


35

Homebrew solution To answer my own question, homebrew-versions now has a fairly up to date formula of GCC. It can be installed using brew install [flags] https://raw.github.com/Homebrew/homebrew-versions/gcc48.rb Where [flags] should include all the required languages, e.g. (--enable-cxx --enable-fortran). This will install the executables with a ...


27

I use HomeBrew too and can confirm it's totally safe. Quoting the Installation page on the official HomeBrew wiki: Do yourself a favour and pick /usr/local It’s easier /usr/local/bin is already in your PATH. It’s easier Tons of build scripts break if their dependencies aren’t in either /usr or /usr/local. We fix this for Homebrew formulas ...


26

Fink has been around since at least 2001. Fink and MacPorts are package managers that want to be "orthogonal" to the system, that is, they install their own version of python, perl, libraries, compilers, etc. in own trees (/sw for Fink, /opt/local for MacPorts). The reason for this is that they have no control what Apple does with its software, and it ...


26

This bash command (taken from there) it will unlink all installed formulas and link them again: brew list -1 | while read line; do brew unlink $line; brew link $line; done I guess that all formulas needed to be linked, otherwise whichever tool is depended on them would have troubles finding them.


24

Install Homebrew (if needed) ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Install R brew tap homebrew/science brew install r


24

Yes, create a .bash_profile file in your home directory containing PATH="/usr/local/bin:$PATH" and then do one of the following to make the change active execute . ~/.bash_profile execute PATH="/usr/local/bin:$PATH" in the current shell restart Terminal


23

Here is the procedure I recommend, for those who are comfortable with the command-line and with Homebrew: Install Homebrew. Run the following on the command line (in Terminal): brew install macvim --override-system-vim brew linkapps Edit your shell startup files to ensure that /usr/local/bin comes first in your $PATH. If you use vim as $VISUAL or ...


22

MacPorts It is more independent of Mac OS X, this means MacPorts will just ignore many of the system libraries and softwares that already available in Mac OS X and pull its own one instead, which could be slower when the utility you install requires some set of large libraries and softwares. But this kind of choice is safer because the packages you ...


22

brew install git $ git --version git version 1.7.12.4 (Apple Git-37) $ which git /usr/bin/git // doh! osx's pre-installed git trumps the brew one, so: $ sudo mv /usr/bin/git /usr/bin/git-apple $ which git /usr/local/bin/git $ git --version git version 1.8.2 // ok ...


21

The solution provided by @Konrad Rudolph is not entirely correct anymore as the GCC formula that he mentioned was moved from homebrew/dupes to homebrew/versions. You can choose which version of GCC to install. For example, at the time of writing this answer, version 4.5, 4.7 and 4.8 are available. You may check out what versions are available here. In ...


19

~/Library/Logs/Homebrew/ Homebrew creates log files in your Library folder at: ~/Library/Logs/Homebrew/ You can view the log files by holding down Option and using the Finder menu item: Go > Library, then navigating to Logs > Homebrew. Alternatively, you can use the Console.app application to browse to the log files. Homebrew History The default ...


19

Depending on your system setup and your command you probably lost only some files - including one essential - and folders and some sym-links. Using the command rm * - executed by an admin in the root folder - usually deletes the sym-link /etc only: Boot to single user mode, check your file system with /sbin/fsck -fy, and mount root read/writable with ...


18

/usr/local/Library/LinkedKegs seems to contain a list of, well, linked kegs, so this should do the trick: ls -1 /usr/local/Library/LinkedKegs | while read line; do echo $line brew unlink $line brew link --force $line done I'd recommend ensuring you have write permissions to /usr/local/lib again before trying this.


17

The command line tools aren't offered via Xcode 5.0.1, but I was able to install them via this terminal command. xcode-select --install It will prompt you that it needs the command line tools and will offer to install them. Worked like a charm for me.


16

mencoder is part of the MPlayer utility, and is installed as part of the MPlayer package on most systems. Installing MPlayer via Homebrew ( brew install mplayer ) will supply the mencoder binary as well. $ brew list mplayer /usr/local/Cellar/mplayer/1.1/bin/mplayer /usr/local/Cellar/mplayer/1.1/bin/mencoder /usr/local/Cellar/mplayer/1.1/share/man/ (2 files) ...


16

You might be better off just installing the standalone Developer Command Line Tools (which includes gcc and other standard developer toolchain items). You can get it from Apple's Developer Downloads (which requires a free developer account). Unfortunately there's no direct link, but just search for command line tools and you'll find it (note that there are ...


16

The MacPort documentation advises to use your Terminal and type: sudo port -fp uninstall installed and with this command, all remaining items will be deleted: sudo rm -rf /opt/local sudo rm -rf /Applications/DarwinPorts sudo rm -rf /Applications/MacPorts sudo rm -rf /Library/LaunchDaemons/org.macports.* sudo rm -rf /Library/Receipts/DarwinPorts*.pkg sudo ...


15

In addition to the homebrew suggestion, you can just download the binary from http://www.r-project.org/ Go to http://www.r-project.org/ Click CRAN Select a mirror Click "download R for (Mac) OS X" Download and install the latest pkg binary See also the R for Mac OSX FAQ that includes information on installation.


14

Just to add some of my own thoughts that seem true-ish circa late 2014 at least. Homebrew, as of a couple of years ago, definitely has the upper hand in terms of mindshare. You'll find a lot of blogs with people talking about how much happier they are with Homebrew - usually because of the whole "Macports pulls in the whole world" vs "Homebrew makes use of ...


13

Mine had the same problem. $ tmux dyld: Library not loaded: /usr/local/lib/libevent-2.0.5.dylib Referenced from: /usr/local/Cellar/tmux/1.9a/bin/tmux Reason: image not found Trace/BPT trap: 5 Tried to install libevent but it was already there, not linked yet: $ brew install libevent Warning: libevent-2.0.21 already installed $ brew link libevent Warning: ...


12

The version and location of Ruby changed with the new Mac OS X version. To fix this in a generic way, edit /usr/local/Library/brew.rb. On the first line, replace 1.8 with Current, i.e. from: #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -W0 to: #!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0


11

You need to install gnu-sed, not just the coreutils: brew install gnu-sed Then, you have to add the following lines on your .bash_profile: export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH" export MANPATH="/usr/local/opt/gnu-sed/libexec/gnuman:$MANPATH" Then your sed version should be the latest: $ sed --version sed (GNU sed) 4.2.2 Copyright ...


11

It is usually better to keep permissions as strict as possible. Keeping /usr/local owned by root means that only processes that run as root/sudo (or ask for admin user via the Apple authorization dialog box) can write to this area. Thus, a process download has to ask you for a password before corrupting files there. But as you say, it makes adding new ...



Only top voted, non community-wiki answers of a minimum length are eligible