{"id":85920,"date":"2020-05-15T07:23:39","date_gmt":"2020-05-14T23:23:39","guid":{"rendered":"http:\/\/4563.org\/?p=85920"},"modified":"2020-05-15T07:23:39","modified_gmt":"2020-05-14T23:23:39","slug":"brew-%e5%ae%89%e8%a3%85%e6%9d%83%e9%99%90%e9%97%ae%e9%a2%98%e6%b1%82%e6%95%91%e3%80%82","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=85920","title":{"rendered":"brew \u5b89\u88c5\u6743\u9650\u95ee\u9898\u6c42\u6551\u3002"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  brew \u5b89\u88c5\u6743\u9650\u95ee\u9898\u6c42\u6551\u3002               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ztlong <\/span>  <span><i><\/i> 5<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>mac \u65b0\u624b\uff0c\u4f7f\u7528 brew \u5b89\u88c5 telnet\uff0c\u53ef\u662f\u5b89\u88c5\u8fc7\u7a0b\u63d0\u793a\u5982\u4e0b\uff1a<\/p>\n<pre><code>Error: The following directories are not writable by your user: \/usr\/local\/lib  You should change the ownership of these directories to your user.   sudo chown -R $(whoami) \/usr\/local\/lib  And make sure that your user has write permission.   chmod u+w \/usr\/local\/lib <\/code><\/pre>\n<p>\u65e2\u7136\u5f53\u524d\u7528\u6237\u6ca1\u6709\u5199\u5165\u6743\u9650\uff0c\u90a3\u4e48 sudo \u6216\u8005\u5207\u6362\u81f3 root \u5b89\u88c5\u5427\uff0c\u4e5f\u4e0d\u884c\uff0c\u4e0d\u8fc7\u8fd9\u4e2a\u9519\u8bef\u5012\u8d77\u7801\u662f\u5f88\u4e2d\u80af\uff1a<\/p>\n<pre><code>Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew does not drop privileges on installation you would be giving all build scripts full access to your system. <\/code><\/pre>\n<p>\u4f46\u662f\u636e\u6211\u5bf9 linux \u7684\u4f7f\u7528\u7ecf\u9a8c\uff0c\/usr\/local\/lib \u7406\u5e94\u7531\u7cfb\u7edf\u638c\u63a7\uff0c\u76f4\u63a5\u8fd9\u4e48\u7b80\u5355\u7c97\u66b4\u7684\u628a\u7cfb\u7edf\u76ee\u5f55\u6539\u6210\u5f53\u524d\u7528\u6237\uff0c\u6709\u6240\u4e0d\u5f53\u5427\uff0c\u867d\u7136\u8fd9\u4e2a\u5e94\u8be5\u4e0d\u4f1a\u6709\u4ec0\u4e48\u5f71\u54cd\u3002\u6216\u8005\u662f\u6211\u5bf9 brew \u7684\u7406\u89e3\u4e0d\u591f\uff0c\u6709\u5176\u4ed6\u7684\u5730\u65b9\u53ef\u4ee5\u914d\u7f6e\uff1f\u8fd8\u8bf7\u5927\u5bb6\u6307\u6559\u3002\u8c22\u8c22\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>3<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1503843\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chendy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/stackoverflow.com\/questions\/41840479\/how-to-use-homebrew-on-a-multi-user-macos-sierra-setup                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1503844\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : IgniteWhite <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \/usr\/local \u5728 macOS \u5c31\u662f\u7528\u6237\u81ea\u7559\u76ee\u5f55\u2026\u8dd1\u90a3\u4e24\u4e2a\u63d0\u793a\u7684\u547d\u4ee4\u5c31\u597d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1503845\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : littleylv <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             ~ groups $(whoami)<br \/>staff<\/p>\n<p>\u7136\u540e\u628a lib \u76ee\u5f55\u6539\u6210 staff \u7ec4\uff0c\u7528\u6237\u4ecd\u7136 root<br \/>drwxrwxr-x 307 root staff<br \/>\u7ed9\u4e0e\u540c\u7ec4\u6743\u9650\uff0c\u8fd9\u6837 $(whoami) \u5c31\u6709\u5199\u6743\u9650\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>brew \u5b89\u88c5\u6743\u9650\u95ee\u9898\u6c42\u6551\u3002 \u8cc7\u6df1&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/85920"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=85920"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/85920\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=85920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=85920"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=85920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}