When trying to install a large software package (haskell-platform and / or ghc) Homebrew didn't want to continue with the installation because of some strage error. To my surprise, Google didn't reveal any hints to other users who had this problem too!
Here are the symptoms:
philipp@lion:$ brew install ghc --devel --verbose
==> Downloading http://www.haskell.org/ghc/dist/7.2.2/ghc-7.2.2-i386-apple-darwin.tar.bz2
File already downloaded in /Users/philipp/Library/Caches/Homebrew
/usr/bin/tar xf /Users/philipp/Library/Caches/Homebrew/ghc-7.2.2.tar.bz2
ghc-7.2.2/libraries/haskeline/dist-install/build/libHShaskeline-0.6.4.0_p.a: Write failed
ghc-7.2.2/libraries/haskeline/dist-install/build/libHShaskeline-0.6.4.0-ghc7.2.2.dylib: Write to restore size failed
ghc-7.2.2/compiler/stage2/build/libHSghc-7.2.2.a: Write to restore size failed
So the unpacking of the downloaded source file produced the problem.
The reason for the problem was that I moved
/private/tmp to a ram disk in order to optimize my Mac OS X to be run on a solid state drive and this ram disk was too small. I found out about that because when I ran the
tar xf command to uncompress the archive manually, it worked (to expand it onto a local folder of my SSD). But Homebrew seems to be extracting to
/private/tmp and that had only 250 Megabyte in a ram disk assigned in my setup. I could watch this happening (the ram disk filling up) by running
watch -d -n.5 df -m while trying the
brew install ghc --devel command again (after having installed
brew install watch).