{"id":1458,"date":"2016-04-07T19:18:56","date_gmt":"2016-04-07T10:18:56","guid":{"rendered":"http:\/\/blog-coppe-jp.local\/web\/?p=1458"},"modified":"2026-10-29T16:30:39","modified_gmt":"2026-10-29T07:30:39","slug":"mac-os-10-11-el-capitan-drush","status":"publish","type":"post","link":"https:\/\/blog.coppe.jp\/en\/2016\/04\/07\/mac-os-10-11-el-capitan-drush\/","title":{"rendered":"Installing Drush on Mac OS X 10.11 (El Capitan) (Memo)"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1464\" src=\"https:\/\/blog.coppe.jp\/app\/uploads\/2016\/04\/Screen-Shot-2016-04-07-at-17.44.08-copy.jpg\" alt=\"Screen Shot 2016-04-07 at 17.44.08 copy\" width=\"1200\" height=\"910\" srcset=\"https:\/\/blog.coppe.jp\/app\/uploads\/2016\/04\/Screen-Shot-2016-04-07-at-17.44.08-copy.jpg 1200w, https:\/\/blog.coppe.jp\/app\/uploads\/2016\/04\/Screen-Shot-2016-04-07-at-17.44.08-copy-300x228.jpg 300w, https:\/\/blog.coppe.jp\/app\/uploads\/2016\/04\/Screen-Shot-2016-04-07-at-17.44.08-copy-768x582.jpg 768w, https:\/\/blog.coppe.jp\/app\/uploads\/2016\/04\/Screen-Shot-2016-04-07-at-17.44.08-copy-1024x777.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>Mac OS X 10.11 (El Capitan)\u306f\u3001Rootless\u3068\u3044\u3046\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u6574\u5408\u6027\u4fdd\u8b77\u6a5f\u80fd\uff08SIP: System Integrity Protection\uff09\u304c\u5c0e\u5165\u3055\u308c\u3066\u3044\u308b\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u7ba1\u7406\u8005\u6a29\u9650(root)\u3067\u3042\u3063\u3066\u3082\u7279\u5b9a\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a2\u30af\u30bb\u30b9\u5236\u9650\u3092\u53d7\u3051\u308b\u3053\u3068\u304c\u3042\u308a\u3001\u305d\u306e\u5f0a\u5bb3\u3067\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u95a2\u9023\u306e\u4f5c\u696d\u304c\u3067\u304d\u306a\u304f\u306a\u308b\u3068\u3044\u3046\u75c7\u72b6\u304c\u767a\u751f\u3059\u308b\u3002\u3002\u3002<\/p>\n<p>Drupal\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u300cDrush\u300d\u3082\u305d\u306e\u4e00\u3064\u3067\u3001\u305d\u306e\u305f\u3081\u50d5\u306f\u3053\u3053\u6570\u30ab\u6708\u306e\u9593\u3001\u81ea\u8eab\u306eMac\u3092El Capitan\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3053\u3068\u3092\u8e8a\u8e87\u3063\u3066\u3044\u305f\u3002\uff08Drush\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306f\u3001\u60a9\u307f\u60a9\u3093\u30672\u65e5\u639b\u304b\u3063\u305f\u3002\u304a\u307e\u3051\u306b\u306a\u305c\u4e0a\u624b\u304f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u305f\u306e\u304b\u660e\u78ba\u306a\u624b\u5fdc\u3048\u304c\u306a\u3044\u307e\u307e\u306e\u6210\u529f\u3060\u3063\u305f\u306e\u3067\u3002\uff09<\/p>\n<p>\u3060\u304c\u5148\u65e5iOS\u304c9.3\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3055\u308c\u3001Mac\u306e\u7d71\u5408\u958b\u767a\u74b0\u5883\u3067\u3042\u308bXcode\u30827.3\u3078\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u5fc5\u8981\u6027\u304c\u3067\u3066\u304d\u305f\u3002\u305d\u306e\u305f\u3081\u306b\u306fMac OS\u3092El Capitan\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3053\u3068\u304c\u4e0d\u53ef\u907f\u3068\u306a\u308a\u3001\u3084\u3063\u3068\u306e\u3053\u3068\u3067\u91cd\u3044\u8170\u3092\u4e0a\u3052\u305f\u3002\u3082\u3046\u4e00\u53f0\u306eMac\u306b\u3082\u540c\u3058\u4f5c\u696d\u3092\u305b\u306d\u3070\u306a\u3089\u305a\u3001\u305d\u306e\u4ed6\u306e\u5fd8\u5099\u9332\u3092\u517c\u306d\u3066\u624b\u9806\u3092\u8a18\u3057\u3066\u304a\u304f\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<p>\u4ee5\u964d\u3001Mac\u306eOS\u309210.11 (El Capitan)\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305f\u3046\u3048\u3067\u306e\u4f5c\u696d\u3068\u306a\u308b\u3002<\/p>\n<p>\u2460 Mac\u3092\u30ea\u30d6\u30fc\u30c8\u3055\u305b\u308b\u3002\u8d77\u52d5\u6642\u306b [\u2318] + [R] \u3092\u3001\u8d77\u52d5\u30b2\u30fc\u30b8\u304c\u52d5\u4f5c\u3057\u59cb\u3081\u308b\u307e\u3067\u62bc\u4e0b\u3057\u3066\u304a\u304f\u3002<\/p>\n<hr \/>\n<p>\u2461 \u30e1\u30cb\u30e5\u30d0\u30fc\u3088\u308a\u3001Utilities &gt; Terminal \u3092\u8d77\u52d5\u3057\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3002<\/p>\n<pre class=\"toolbar-overlay:false nums:false lang:default highlight:0 decode:true\">-bash-3.2# csrutil disable\r\n-bash-3.2# reboot<\/pre>\n<p>Mac\u304c\u30ea\u30d6\u30fc\u30c8\u3055\u308c\u3001Rootless\u304c\u7121\u52b9\u306b\u306a\u308b\u3002<\/p>\n<hr \/>\n<p>\u2462 \u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u884c\u306a\u3046\u3002\u518d\u5ea6Terminal\u3092\u8d77\u52d5\u3057\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3002<\/p>\n<pre class=\"toolbar-overlay:false nums:false lang:default highlight:0 decode:true\">$ sudo gem update<\/pre>\n<hr \/>\n<p>\u2463 PHP\u30e9\u30a4\u30d6\u30e9\u30ea\u7ba1\u7406\u30c4\u30fc\u30eb\u300cComposer\u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<pre class=\"toolbar-overlay:false nums:false lang:default highlight:0 decode:true \">$ brew update\r\n$ brew tap homebrew\/homebrew-php\r\n$ brew tap homebrew\/dupes\r\n$ brew tap homebrew\/versions\r\n$ brew install php55-intl\r\n$ brew install homebrew\/php\/composer<\/pre>\n<hr \/>\n<p>\u2464 Drush\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<pre class=\"toolbar-overlay:false nums:false lang:default highlight:0 decode:true\">$ composer global require drush\/drush:7.*<\/pre>\n<hr \/>\n<p>\u2465 ~\/.bash_profile \u306b\u4ee5\u4e0b\u306e 1 \u884c\u3092\u8ffd\u52a0\u3057\u3001\u30d1\u30b9\u3092\u901a\u3059\u3002<\/p>\n<pre class=\"toolbar-overlay:false nums:false lang:default highlight:0 decode:true\">PATH=\"~\/.composer\/vendor\/bin:$PATH\"<\/pre>\n<hr \/>\n<p>\u2466 \u00a0MAMP\u3092\u8d77\u52d5\u3002\u4f9d\u5b58\u95a2\u4fc2\u554f\u984c\u3067Apach\u304c\u7acb\u3061\u4e0a\u304c\u3089\u306a\u3044\u306a\u3069\u306e\u30a8\u30e9\u30fc\u304c\u751f\u3058\u3066\u3044\u308b\u5834\u5408\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1475 size-medium\" src=\"https:\/\/blog.coppe.jp\/app\/uploads\/2016\/04\/Screen-Shot-2016-04-08-at-06.49.07-300x227.png\" alt=\"Screen Shot 2016-04-08 at 06.49.07\" width=\"300\" height=\"227\" srcset=\"https:\/\/blog.coppe.jp\/app\/uploads\/2016\/04\/Screen-Shot-2016-04-08-at-06.49.07-300x227.png 300w, https:\/\/blog.coppe.jp\/app\/uploads\/2016\/04\/Screen-Shot-2016-04-08-at-06.49.07-768x581.png 768w, https:\/\/blog.coppe.jp\/app\/uploads\/2016\/04\/Screen-Shot-2016-04-08-at-06.49.07-1024x775.png 1024w, https:\/\/blog.coppe.jp\/app\/uploads\/2016\/04\/Screen-Shot-2016-04-08-at-06.49.07.png 1126w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<hr \/>\n<p>\u2467 Drupal\u306e\u4f5c\u696d\u968e\u5c64\u307e\u3067cd\u3057\u3001drush ogrd\u3092\u5b9f\u884c\u3002<\/p>\n<hr \/>\n<p>\u2468 drush ogrd\u6642\u3001\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u969b\u3001<\/p>\n<pre class=\"toolbar-overlay:false nums:false lang:default highlight:0 decode:true\">Additional uncaught exception thrown while handling exception.\r\nOriginal\r\nPDOException: SQLSTATE[HY000] [2002] Socket operation on non-socket \r\nin drupal_is_denied() (line **** of \/Users\/*****\/*****\/*****\/*****\/includes\/bootstrap.inc).\r\nAdditional\r\nPDOException: SQLSTATE[HY000] [2002] Socket operation on non-socket \r\nin _registry_check_code() (line **** of \/Users\/*****\/*****\/*****\/*****\/includes\/bootstrap.inc).\r\nDrush command terminated abnormally due to an unrecoverable error.   [error]<\/pre>\n<p><span style=\"font-family: -apple-system, BlinkMacSystemFont, &#039;Segoe UI&#039;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &#039;Helvetica Neue&#039;, sans-serif\">mysql.sock\u306e\u30ea\u30f3\u30af\u3092\u8a2d\u5b9a\u3057\u306a\u304a\u3059\u5fc5\u8981\u304c\u3042\u308b\u3002\u307e\u305amysql.sock\u306e\u5834\u6240\u3092\u63a2\u3059\u3002<\/span><\/p>\n<pre class=\"toolbar-overlay:false nums:false lang:default highlight:0 decode:true\">$ mysqladmin variables | grep mysql.sock\r\n| socket      | \/Applications\/MAMP\/tmp\/mysql\/mysql.sock      |<\/pre>\n<p>\u305d\u306e\u5834\u6240\u3078\u306e\u30ea\u30f3\u30af\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<pre class=\"toolbar-overlay:false nums:false lang:default highlight:0 decode:true \">$ cd \/var\r\n$ sudo mkdir mysql \r\n$ cd mysql\r\n$ sudo ln -s \/Applications\/MAMP\/tmp\/mysql\/mysql.sock<\/pre>\n<p>\u4ee5\u4e0a\u3068\u306a\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mac OS X 10.11 (El Capitan) is\u2026<\/p>","protected":false},"author":5,"featured_media":1464,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1458","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.coppe.jp\/en\/wp-json\/wp\/v2\/posts\/1458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.coppe.jp\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coppe.jp\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coppe.jp\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coppe.jp\/en\/wp-json\/wp\/v2\/comments?post=1458"}],"version-history":[{"count":23,"href":"https:\/\/blog.coppe.jp\/en\/wp-json\/wp\/v2\/posts\/1458\/revisions"}],"predecessor-version":[{"id":2286,"href":"https:\/\/blog.coppe.jp\/en\/wp-json\/wp\/v2\/posts\/1458\/revisions\/2286"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.coppe.jp\/en\/wp-json\/wp\/v2\/media\/1464"}],"wp:attachment":[{"href":"https:\/\/blog.coppe.jp\/en\/wp-json\/wp\/v2\/media?parent=1458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coppe.jp\/en\/wp-json\/wp\/v2\/categories?post=1458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coppe.jp\/en\/wp-json\/wp\/v2\/tags?post=1458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}