LoginSignup
13
8

More than 5 years have passed since last update.

Macのhomebrewでnkfをインストールしたらalready installed, it's just not linkedと出た時の対策

Last updated at Posted at 2015-11-10

背景

文字コードの変換を行うためのnkfを使う必要が出てきましたが、僕のMacoBookにはnkfが入っていませんでした。
そこで、homebrewを使ってインストールをしようとしたところ少し躓いたので、メモしておきます。

まずはインストールをやってみた

$ brew install nkf

インストールはできたようだがコマンドが見つからない

インストール後、--versionしてもコマンドが無いとエラーが出た

$ nkf --version
-bash: nkf: command not found

そこで再度インストールしようとしたところ リンクされてないというエラーが出た

$ brew install nkf
Warning: nkf-2.1.3 already installed, it's just not linked

リンクをしようとするも権限の問題で不可だった

$ brew link nkf
Linking /usr/local/Cellar/nkf/2.1.3... 
Error: Could not symlink share/man/ja/man1/nkf.1
/usr/local/share/man/ja/man1 is not writable.

書き込み権限を変更して、再度インストールしたら解決

sudo chmod o+w /usr/local/share/man/ja/man1

再度リンクをするように設定

$ brew link nkf

これで動くようになりました。

13
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
8