Homebrewのエラーを治す

Warning: /usr/local/lib/pkgconfig isn't writable.
This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a brew tries to write a file to this directory, the
install will fail during the link step.
You should probably `chown` /usr/local/lib/pkgconfig
xcrun: error: active developer path ("/Volumes/Xcode 4.5 DP4/Xcode45-DP4.app/Contents/Developer") does not exist, use xcode-select to change
xcrun: error: active developer path ("/Volumes/Xcode 4.5 DP4/Xcode45-DP4.app/Contents/Developer") does not exist, use xcode-select to change
Warning: Unbrewed dylibs 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 dylibs:
/usr/local/lib/libavcodec.54.91.100.dylib
/usr/local/lib/libavdevice.54.3.102.dylib
/usr/local/lib/libavfilter.3.34.101.dylib
/usr/local/lib/libavformat.54.61.104.dylib
/usr/local/lib/libavutil.52.17.100.dylib
/usr/local/lib/libmp3lame.0.dylib
/usr/local/lib/libswresample.0.17.102.dylib
/usr/local/lib/libswscale.2.2.100.dylib
Warning: Unbrewed .la files 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 .la files:
/usr/local/lib/libmp3lame.la
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/fuse.pc
/usr/local/lib/pkgconfig/libavcodec.pc
/usr/local/lib/pkgconfig/libavdevice.pc
/usr/local/lib/pkgconfig/libavfilter.pc
/usr/local/lib/pkgconfig/libavformat.pc
/usr/local/lib/pkgconfig/libavutil.pc
/usr/local/lib/pkgconfig/libswresample.pc
/usr/local/lib/pkgconfig/libswscale.pc
/usr/local/lib/pkgconfig/nodejs.pc
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/libavcodec.a
/usr/local/lib/libavdevice.a
/usr/local/lib/libavfilter.a
/usr/local/lib/libavformat.a
/usr/local/lib/libavutil.a
/usr/local/lib/libmp3lame.a
/usr/local/lib/libswresample.a
/usr/local/lib/libswscale.a
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
node
pcre
xcrun: error: active developer path ("/Volumes/Xcode 4.5 DP4/Xcode45-DP4.app/Contents/Developer") does not exist, use xcode-select to change
xcrun: error: active developer path ("/Volumes/Xcode 4.5 DP4/Xcode45-DP4.app/Contents/Developer") does not exist, use xcode-select to change
Warning: Missing git origin remote.
Without a correctly configured origin, Homebrew won't update
properly. You can solve this by adding the Homebrew remote:
cd /usr/local
git remote add origin https://github.com/Homebrew/homebrew.git
xcrun: error: active developer path ("/Volumes/Xcode 4.5 DP4/Xcode45-DP4.app/Contents/Developer") does not exist, use xcode-select to change
Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:
dbilogstrip
dbiprof
dbiproxy
Consider setting your PATH so that /usr/local/bin
occurs before /usr/bin. Here is a one-liner:
echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile
xcrun: error: active developer path ("/Volumes/Xcode 4.5 DP4/Xcode45-DP4.app/Contents/Developer") does not exist, use xcode-select to change
Warning: A newer Command Line Tools release is available
Update them from Software Update in the App Store.
xcrun: error: active developer path ("/Volumes/Xcode 4.5 DP4/Xcode45-DP4.app/Contents/Developer") does not exist, use xcode-select to change