Syntax Error.

[Sy] Homebrewインストール後にbrew doctorでWarningが出た時の対処

2014/06/09
Homebrew

Mac OS X (Mavericks)Homebrew をインストール後、問題がないかチェックしてくれるbrew doctorというコマンドがあります。

これを実行したところ,Warningが出たので解決までの手順をメモ。

$ brew doctor
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/libmacfuse_i32.2.dylib
    /usr/local/lib/libmacfuse_i64.2.dylib
    /usr/local/lib/libosxfuse_i32.2.dylib
    /usr/local/lib/libosxfuse_i64.2.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/libosxfuse_i32.la
    /usr/local/lib/libosxfuse_i64.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/osxfuse.pc

Warning: Your Homebrew is outdated.
You haven't updated for at least 24 hours, this is a long time in brewland!
To update Homebrew, run `brew update`.

なんかファイルを消せと言われてるので消す。

$ rm -rf /usr/local/lib/libmacfuse_i32.2.dylib
$ rm -rf /usr/local/lib/libmacfuse_i64.2.dylib
$ rm -rf /usr/local/lib/libosxfuse_i32.2.dylib
$ rm -rf /usr/local/lib/libosxfuse_i64.2.dylib
$ rm -rf /usr/local/lib/libosxfuse_i32.la
$ rm -rf /usr/local/lib/libosxfuse_i64.la
$ rm -rf /usr/local/lib/pkgconfig/osxfuse.pc

もう一度brew doctorを実行してみます。

次は削除したファイルのシンボリックリンクがエラーに。

$ brew doctor
Warning: Broken symlinks were found. Remove them with `brew prune`:
  /usr/local/lib/pkgconfig/fuse.pc
  /usr/local/lib/libosxfuse_i64.dylib
  /usr/local/lib/libosxfuse_i32.dylib
  /usr/local/lib/libosxfuse.la
  /usr/local/lib/libosxfuse.dylib
  /usr/local/lib/libosxfuse.2.dylib
  /usr/local/lib/libmacfuse_i64.dylib
  /usr/local/lib/libmacfuse_i32.dylib
  /usr/local/lib/libfuse_ino64.dylib
  /usr/local/lib/libfuse_ino64.2.dylib
  /usr/local/lib/libfuse.dylib
  /usr/local/lib/libfuse.2.dylib
  /usr/local/lib/libfuse.0.dylib

Warning: Your Homebrew is outdated.
You haven't updated for at least 24 hours, this is a long time in brewland!
To update Homebrew, run `brew update`.

brew pruneでシンボリックリンクをきれいにする。

$ brew prune
Pruned 0 dead formulae
Pruned 13 symbolic links and 2 directories from /usr/local

あとはアップデートだけの様子。

$ brew doctor
Warning: Your Homebrew is outdated.
You haven't updated for at least 24 hours, this is a long time in brewland!
To update Homebrew, run `brew update`.

brew updateを実行。

$ brew update
Updated Homebrew from 28593486 to 4d8e2ab2.
==> New Formulae
apngasm		  librem	    sfcgal	      waon
known_hosts	  nodebrew	    sqlitebrowser
==> Updated Formulae
abook			      ifuse			    plustache
acpica			      imagesnap			    postgis
activemq-cpp		      influxdb			    postgresql
afflib			      iperf3			    privoxy
afuse			      irrlicht			    ps2eps
akka			      isc-dhcp			    pyenv
arangodb		      isync			    pygobject3
asciidoc		      jena			    pyqt5
avian			      jenkins			    python
avrdude			      jetty			    python3
aws-elasticbeanstalk	      json-glib			    qemu
beansdb			      juju			    qt5
blitzwave		      launch			    rbenv-gemset
blueutil		      lhasa			    riak
boost			      libbson			    ruby
bulk_extractor		      libcec			    s3fs
cassandra		      libcppa			    salt
cfitsio			      libdc1394			    sassc
chrome-cli		      libevent			    saxon
class-dump		      libical			    sbcl
closure-compiler	      libiscsi			    sbt
contacts		      libmicrohttpd		    sdl
coremod			      libmpdclient		    sdl2
couchdb-lucene		      libmxml			    sdl2_mixer
crash			      libnet			    shivavg
ctl			      libogg			    shrewsoft-vpn-client
curaengine		      libsass			    sip
cvs			      libsndfile		    sleepwatcher
dar			      libspatialite		    sleuthkit
datomic			      libtermkey		    sonar
dex2jar			      libusb			    sphinx
dmd			      libvirt			    srecord
drush			      libvorbis			    stormfs
duti			      libxc			    submarine
elinks			      libxml2			    subversion
elixir			      liquibase			    tee-clc
emacs			      luciddb			    terminal-notifier
fdk-aac			      macvim			    tlsdate
flactag			      mercurial			    tmap
fleetctl		      mfcuk			    tmux
fontforge		      mfoc			    tpl
freerdp			      mogenerator		    tracebox
fsharp			      monetdb			    transmission-remote-gtk
fswatch			      mongo-c			    twemcache
fuse4x-kext		      moreutils			    typesafe-activator
fwknop			      mplayershell		    unar
gdal			      msitools			    uru
gdk-pixbuf		      mysql			    vcprompt
genders			      nanomsg			    vert.x
geoip			      neo4j			    voldemort
ghostscript		      nfcutils			    voltdb
gistit			      ngrep			    voms
git-tf			      nordugrid-arc		    vowpal-wabbit
gitbucket		      notmuch			    watchman
global			      nss			    wireshark
globus-toolkit		      objc-codegenutils		    wry
gnutls			      open-ocd			    xbee-comm
gpsbabel		      orpie			    xpdf
graphviz		      osm2pgsql			    xulrunner
grepcidr		      osxfuse			    yaf
groovy			      pam_yubico		    yasm
gupnp			      passenger			    yeti
harfbuzz		      pdf-tools			    youtube-dl
henplus			      plan9port			    zookeeper
horndis			      platypus			    zxcc
htop-osx		      play
==> Deleted Formulae
jstalk

これで大丈夫なはず。

$ brew doctor
Your system is ready to brew.

無事Warningが全部消えました。