事案
$ sudo port install gnuplot
が失敗する。
環境
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.2
BuildVersion: 15C50
$ uname -rs
Darwin 15.2.0
$ port version
Version: 2.3.4
調査
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_aquaterm/aquaterm/main.log
を見ると
:info:build Exception: Unable to lookup com.apple.CoreSimulator.CoreSimulatorService in the bootstrap.
```
とのこと。このエラーメッセージでググる。
# 解決
[Build failures after upgrading to Xcode 7.2](https://trac.macports.org/wiki/ProblemHotlist#xcode7.2)によると以下のコマンドをたたくがよろしとのこと。
```bash
$ sudo chmod -R g-w $(xcode-select -p)/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc
$ sudo chown -R root:wheel $(xcode-select -p)/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc
```
うまくいった!