I recently converted from macports to homebrew and my previous macports Imagemagick install was working fine. I followed the homebrew instructions to chown /usr/local (somewhat
I had this problem and it turned out to be permissions.
sudo chown myuser:wheel /usr/local
then:
brew remove jpeg
brew remove imagemagick
brew install jpeg
brew install imagemagick
sorted it. Word of warning though: I had MySQL sittting in /usr/local/ too, and I inadvertently messed up permissions for that, so if you've got anything else important in there, be careful :-) Fixed that with:
sudo chown -R mysql:wheel /usr/local/mysql/data
Hope this helps someone!