{"id":1080,"date":"2015-10-01T13:44:56","date_gmt":"2015-10-01T04:44:56","guid":{"rendered":"https:\/\/blog.ymyzk.com\/?p=1080"},"modified":"2016-09-29T01:27:56","modified_gmt":"2016-09-28T16:27:56","slug":"os-x-el-capitan-homebrew","status":"publish","type":"post","link":"https:\/\/blog.ymyzk.com\/2015\/10\/os-x-el-capitan-homebrew\/","title":{"rendered":"OS X El Capitan \u3067 Homebrew \u3092\u4f7f\u3046\u65b9\u6cd5 (2016\u5e746\u6708\u66f4\u65b0)"},"content":{"rendered":"

OS X El Capitan \u3067\u306f System Integrity Protection<\/a> (SIP) (rootless \u3068\u3082\u547c\u3070\u308c\u308b) \u3068\u3044\u3046\u6a5f\u80fd\u304c\u5c0e\u5165\u3055\u308c, \/usr<\/code> \u3084 \/System<\/code> \u3068\u3044\u3063\u305f\u91cd\u8981\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078\u306e\u66f8\u304d\u8fbc\u307f\u3092\u5236\u9650\u3057\u307e\u3059. \u901a\u5e38 \/usr\/local<\/code> \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b Homebrew \u3082\u3053\u306e\u5f71\u97ff\u3092\u53d7\u3051\u308b\u305f\u3081, \u3053\u308c\u3092\u56de\u907f\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059.<\/p>\n

2016\/9 \u8ffd\u8a18:\u00a0macOS Sierra \u3067 Homebrew \u3092\u4f7f\u3046\u65b9\u6cd5<\/a><\/p>\n

<\/p>\n

\u6982\u8981<\/h2>\n

\u5bfe\u5fdc\u65b9\u6cd5\u306f Homebrew \u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u00a0(\u524a\u9664\u6e08\u307f)\u00a0\u3067\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059. Homebrew \u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u306e \/usr\/local<\/code> \u4ee5\u5916\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u7279\u306b\u5bfe\u5fdc\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093.<\/p>\n

WWDC 2015 \u3067\u306f \/usr<\/code> \u306f SIP \u306e\u5bfe\u8c61\u306b\u306a\u308b\u304c, \/usr\/local<\/code> \u306f\u958b\u767a\u8005\u304c\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u7d39\u4ecb\u3055\u308c\u307e\u3057\u305f. \u3057\u304b\u3057, OS X \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u5ea6\u306b<\/strong> \/usr\/local<\/code> \u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u304c root:wheel restricted<\/code> \u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3088\u3046\u3067, \u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306e\u5ea6\u306b\u4fee\u6b63\u304c\u5fc5\u8981\u3067\u3059.<\/del>\u00a0\u305f\u3060\u3057, El Capitan \u3067 Homebrew \u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u306f\u3058\u3081\u306b\u4e00\u5ea6\u3060\u3051<\/strong>\u00a0\/usr\/local<\/code> \u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u4fee\u6b63\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059.<\/p>\n

\u5bfe\u5fdc<\/h2>\n

\/usr\/local<\/code> \u304c\u65e2\u306b\u5b58\u5728\u3059\u308b\u5834\u5408<\/h3>\n

Homebrew \u3092\u3059\u3067\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3053\u3061\u3089\u306b\u8a72\u5f53\u3057\u307e\u3059. \/usr\/local<\/code> \u306e\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u5909\u66f4\u3059\u308c\u3070 OK \u3067\u3059.<\/p>\n

sudo chown -R $(whoami):admin \/usr\/local\r\n<\/pre>\n

\/usr\/local<\/code> \u304c\u5b58\u5728\u3057\u306a\u3044\u5834\u5408<\/h3>\n

OS X 10.11.1 \u306b\u542b\u307e\u308c\u308b com.apple.pkg.SystemIntegrityProtectionConfig.14U2076<\/code> \u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306b\u3088\u3063\u3066 SIP \u3092\u7121\u52b9\u5316\u3057\u306a\u304f\u3066\u3082\u00a0\/usr\/local<\/code>\u00a0\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059. \u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u00a0\/usr\/local<\/code>\u00a0\u3092\u4f5c\u6210\u3057\u3066\u9069\u5207\u306a\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u3092\u8a2d\u5b9a\u3057\u307e\u3059.<\/p>\n

sudo mkdir \/usr\/local && sudo chflags norestricted \/usr\/local && sudo chown -R $(whoami):admin \/usr\/local<\/pre>\n

\u4e0a\u8a18\u306e\u65b9\u6cd5\u304c\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u5834\u5408\u306f, \u4ee5\u4e0b\u306e\u624b\u9806\u306b\u5f93\u3063\u3066\u4e00\u5ea6 SIP \u3092\u7121\u52b9\u5316\u3057\u3066\u8a66\u3057\u3066\u307f\u3066\u4e0b\u3055\u3044.<\/p>\n

SIP \u306e\u7121\u52b9\u5316<\/h4>\n

OS X \u3092\u7d42\u4e86\u3057 Command + R \u3092\u62bc\u4e0b\u3057\u306a\u304c\u3089\u8d77\u52d5\u3057\u3066\u30ea\u30ab\u30d0\u30ea\u30fc\u30e2\u30fc\u30c9\u306b\u5165\u308a\u307e\u3059. csrutil disable<\/code> \u3092\u5b9f\u884c\u3057\u3066 SIP \u3092\u7121\u52b9\u5316\u3057\u307e\u3059.<\/p>\n

\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a<\/h4>\n

OS X \u3092\u901a\u5e38\u8d77\u52d5\u3057, \/usr\/local<\/code> \u306e\u4f5c\u6210\u3068\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059.<\/p>\n

sudo mkdir \/usr\/local && sudo chflags norestricted \/usr\/local && sudo chown -R $(whoami):admin \/usr\/local\r\n<\/pre>\n

SIP \u306e\u6709\u52b9\u5316<\/h4>\n

\u518d\u5ea6 OS X \u3092\u7d42\u4e86\u3057 Command + R \u3092\u62bc\u4e0b\u3057\u306a\u304c\u3089\u8d77\u52d5\u3057\u3066\u30ea\u30ab\u30d0\u30ea\u30fc\u30e2\u30fc\u30c9\u306b\u5165\u308a\u307e\u3059. csrutil enable<\/code> \u3092\u5b9f\u884c\u3057\u3066 SIP \u3092\u6709\u52b9\u5316\u3057\u307e\u3059.<\/p>\n

\u66f4\u65b0\u5c65\u6b74<\/h2>\n