LoginSignup
3
0

More than 3 years have passed since last update.

Macで '/Library/Developer/CommandLineTools' is a command line tools instance って言われた

Posted at
  • macOSMojave
  • バージョン10.14.6

雑メモ。

ターミナルで下記のように言われた。

$ opendiff
xcode-select: error: tool 'opendiff' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

そこで

$ ls -la /Library/Developer/CommandLineTools/
total 0
drwxr-xr-x 6 root admin 192 8 15 11:16 .
drwxr-xr-x 4 root admin 128 9 8 17:43 ..
drwxr-xr-x 5 root admin 160 7 13 13:44 Library
drwxr-xr-x 3 root admin 96 7 13 13:11 Packages
drwxr-xr-x 4 root wheel 128 8 15 11:16 SDKs
drwxr-xr-x 7 root admin 224 7 13 13:44 usr
$ xcode-select -p
/Library/Developer/CommandLineTools

と環境を見てみたが、何が問題なのかよくわからんかった。

ググって出てきたこの記事
http://shinriyo.hateblo.jp/entry/2018/02/17/IonicのiOSのビルドのエラー

を参考にして

$ sudo xcode-select -switch /Library/Developer/CommandLineTools
$ sudo xcode-select -r

とやってみたら、

$ opendiff
2019-12-19 08:37:14.020 opendiff[53779:3245168] too few arguments
2019-12-19 08:37:14.024 opendiff[53779:3245168] usage: opendiff file1 file2 [-ancestor ancestorFile] [-merge mergeFile]

使えるようになった。
なお、どういう原理で問題が解消したかは把握してない。

今回の記事は以上です。

3
0
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
3
0