﻿{"id":2074,"date":"2020-03-24T16:52:10","date_gmt":"2020-03-24T08:52:10","guid":{"rendered":"http:\/\/nick.txtcc.com\/?p=2074"},"modified":"2020-03-24T16:52:10","modified_gmt":"2020-03-24T08:52:10","slug":"homebrew%e5%ae%89%e8%a3%85%e5%92%8c%e8%a7%a3%e5%86%b3brew%e5%ae%89%e8%a3%85%e9%80%9f%e5%ba%a6%e6%85%a2%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/nick.txtcc.com\/index.php\/mac-os\/2074","title":{"rendered":"homebrew\u5b89\u88c5\u548c\u89e3\u51b3brew\u5b89\u88c5\u901f\u5ea6\u6162\u7684\u95ee\u9898"},"content":{"rendered":"<h2 id=\"homebrew\u5b89\u88c5\">homebrew\u5b89\u88c5<\/h2>\n<pre><code class=\"language-bash hljs\">ruby -e &ldquo;$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install)&rdquo;\n<\/code><\/pre>\n<h2 id=\"\u89e3\u51b3brew\u5b89\u88c5\u901f\u5ea6\u6162\u7684\u95ee\u9898\u66ff\u6362homebrew\u955c\u50cf\u6e90\">\u89e3\u51b3brew\u5b89\u88c5\u901f\u5ea6\u6162\u7684\u95ee\u9898(\u66ff\u6362homebrew\u955c\u50cf\u6e90)<\/h2>\n<p>1.\u66ff\u6362brew.git:<\/p>\n<pre><code class=\"language-bash hljs\">&lt;span class=&quot;hljs-built_in&quot;&gt;cd&lt;\/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&lt;span class=&quot;hljs-variable&quot;&gt;$(brew --repo)&lt;\/span&gt;\ngit remote set-url origin https:\/\/mirrors.aliyun.com\/homebrew\/brew.git\n&lt;\/span&gt;<\/code><\/pre>\n<p>2.\u66ff\u6362homebrew-core.git:<\/p>\n<pre><code class=\"language-bash hljs\">&lt;span class=&quot;hljs-built_in&quot;&gt;cd&lt;\/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&lt;span class=&quot;hljs-variable&quot;&gt;$(brew --repo)&lt;\/span&gt;\/Library\/Taps\/homebrew\/homebrew-core&lt;\/span&gt;\ngit remote &lt;span class=&quot;hljs-built_in&quot;&gt;set&lt;\/span&gt;-url origin https:\/\/mirrors.aliyun.com\/homebrew\/homebrew-core.git\n<\/code><\/pre>\n<p>3.\u7ec8\u7aef\u8f93\u5165\u547d\u4ee4\uff1a<\/p>\n<blockquote>echo $SHELL \u770b\u8f93\u51fa\u7ed3\u679c\u662f\/bin\/zsh\u8fd8\u662f\/bin\/bash<\/blockquote>\n<ul>\n    <li>\/bin\/zsh\u66ff\u6362homebrew-bottles:<\/li>\n<\/ul>\n<pre><code class=\"language-bash hljs\">&lt;span class=&quot;hljs-built_in&quot;&gt;echo&lt;\/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;'export HOMEBREW_BOTTLE_DOMAIN=https:\/\/mirrors.aliyun.com\/homebrew\/homebrew-bottles'&lt;\/span&gt; &gt;&gt; ~\/.zshrc\n&lt;span class=&quot;hljs-built_in&quot;&gt;source&lt;\/span&gt; ~\/.zshrc\n<\/code><\/pre>\n<ul>\n    <li>\/bin\/bash\u66ff\u6362homebrew-bottles:<\/li>\n<\/ul>\n<pre><code class=\"language-bash hljs\">&lt;span class=&quot;hljs-built_in&quot;&gt;echo&lt;\/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;'export HOMEBREW_BOTTLE_DOMAIN=https:\/\/mirrors.ustc.edu.cn\/homebrew-bottles'&lt;\/span&gt; &gt;&gt; ~\/.bash_profile\n&lt;span class=&quot;hljs-built_in&quot;&gt;source&lt;\/span&gt; ~\/.bash_profile\n<\/code><\/pre>\n<p>4.\u6062\u590dhomebrew\u56fd\u5185\u955c\u50cf\u6e90\u914d\u7f6e<\/p>\n<ul>\n    <li>\u91cd\u7f6ebrew.git<\/li>\n<\/ul>\n<pre><code class=\"language-bash hljs\">&lt;span class=&quot;hljs-built_in&quot;&gt;cd&lt;\/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&lt;span class=&quot;hljs-variable&quot;&gt;$(brew --repo)&lt;\/span&gt;&lt;\/span&gt;\ngit remote &lt;span class=&quot;hljs-built_in&quot;&gt;set&lt;\/span&gt;-url origin https:\/\/github.com\/Homebrew\/brew.git\n<\/code><\/pre>\n<ul>\n    <li>\u91cd\u7f6ehomebrew-core.git<\/li>\n<\/ul>\n<pre><code class=\"language-bash hljs\">&lt;span class=&quot;hljs-built_in&quot;&gt;cd&lt;\/span&gt; &lt;span class=&quot;hljs-string&quot;&gt;&lt;span class=&quot;hljs-variable&quot;&gt;$(brew --repo)&lt;\/span&gt;\/Library\/Taps\/homebrew\/homebrew-core&lt;\/span&gt;\ngit remote &lt;span class=&quot;hljs-built_in&quot;&gt;set&lt;\/span&gt;-url origin https:\/\/github.com\/Homebrew\/homebrew-core.git\n<\/code><\/pre>\n<ul>\n    <li>\u91cd\u7f6ehomebrew-bottles<\/li>\n<\/ul>\n<pre><code class=\"language-bash hljs\">\u5c06\u521a\u6dfb\u52a0\u5230~\/.bash_profile\u6587\u4ef6\u7684\u8bed\u53e5\u6ce8\u91ca\u6389\u5373\u53ef\n<\/code><\/pre>\n<h2 id=\"\u89e3\u51b3brew\u5b89\u88c5\u5305\u4e00\u76f4\u5361\u5728updating-homebrew\">\u89e3\u51b3brew\u5b89\u88c5\u5305\u4e00\u76f4\u5361\u5728Updating Homebrew<\/h2>\n<blockquote>\u8fd0\u884c\u547d\u4ee4brew install node\uff0c\u7ed3\u679c\u754c\u9762\u4e00\u76f4\u5361\u5728Updating Homebrew\u4e0a\uff0c\u6709\u4e24\u79cd\u89e3\u51b3\u529e\u6cd5<\/blockquote>\n<p>\u65b9\u6cd5\u4e00\uff1a\u5173\u95edbrew\u6bcf\u6b21\u6267\u884c\u547d\u4ee4\u65f6\u7684\u81ea\u52a8\u66f4\u65b0\uff08\u63a8\u8350\uff09<\/p>\n<pre><code class=\"language-bash hljs\">vim ~\/.bash_profile\n&lt;span class=&quot;hljs-comment&quot;&gt;# \u65b0\u589e\u4e00\u884c&lt;\/span&gt;\n&lt;span class=&quot;hljs-built_in&quot;&gt;export&lt;\/span&gt; HOMEBREW_NO_AUTO_UPDATE=&lt;span class=&quot;hljs-literal&quot;&gt;true&lt;\/span&gt;\n<\/code><\/pre>\n<p>\u65b9\u6cd5\u4e8c(\u61d2\u4eba\u65b9\u6cd5)\uff1a<\/p>\n<pre><code class=\"language-bash hljs\">\u51fa\u73b0Updating Homebrew\u7684\u65f6\u5019ctrl+c\u4e00\u4e0b\u5c31\u884c<\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>homebrew\u5b89\u88c5 ruby -e &ldquo;$(curl -fsSL <a href=\"https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/ins&#46;&#46;&#038;#46\">https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/ins&#46;&#46;&#038;#46<\/a>;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[340],"tags":[505],"class_list":["post-2074","post","type-post","status-publish","format-standard","hentry","category-mac-os","tag-brew"],"_links":{"self":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/2074","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=2074"}],"version-history":[{"count":1,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/2074\/revisions"}],"predecessor-version":[{"id":2075,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/2074\/revisions\/2075"}],"wp:attachment":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=2074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=2074"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=2074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}