経緯
nodejsのバージョンをあげようと思って、yumからnodejsとnpmを削除後
ソースコンパインルでnodejsをインストール。
そのとき、インストールディレクトリを/usr から /usr/local に変更した。
そしたらなぜかwhichがなくなっていたので、lsしたらnode_modulesになっていた
$ ls -la /usr/bin/which
lrwxrwxrwx 1 root root 35 Jun 5 17:21 which@ -> ../lib/node_modules/which/bin/which
修復
whichの再インストール
$ sudo yum reinstall which
(中略)
$ ls -la /usr/bin/which
-rwxr-xr-x 1 root root 20768 Jun 22 2011 /usr/bin/which*
いつのまに書き換えられていたんだろう…
追記
sudo npm install -g hogehoge
が正常に動かないなど
いろいろ弊害がでてきたので、prefix=/usr に変更しました。。