{"id":3691,"date":"2026-02-05T22:07:58","date_gmt":"2026-02-05T14:07:58","guid":{"rendered":"http:\/\/www.banbanli.net\/blog\/?p=3691"},"modified":"2026-02-05T22:07:58","modified_gmt":"2026-02-05T14:07:58","slug":"homebrew-101","status":"publish","type":"post","link":"http:\/\/www.banbanli.net\/blog\/?p=3691","title":{"rendered":"HomeBrew 101"},"content":{"rendered":"\n<p>Homebrew \u662f Mac \u4e0a\u6700\u5f37\u5927\u7684\u5957\u4ef6\u7ba1\u7406\u5de5\u5177\uff0c\u7c21\u55ae\u4f86\u8aaa\uff0c\u5b83\u5c31\u50cf\u662f\u958b\u767c\u8005\u7248\u7684\u300cApp Store\u300d\uff0c\u8b93\u4f60\u900f\u904e\u4e00\u884c\u6307\u4ee4\u5c31\u80fd\u5b89\u88dd\u5404\u7a2e\u8edf\u9ad4\u548c\u958b\u767c\u5de5\u5177\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u70ba\u4f60\u6574\u7406\u7684\u7c21\u6613\u6559\u5b78\uff1a<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">1. \u5b89\u88dd Homebrew<\/h2>\n\n\n\n<p>\u8acb\u6253\u958b\u4f60\u7684\u300c<strong>\u7d42\u7aef\u6a5f<\/strong>\u300d(Terminal)\uff0c\u5c07\u4ee5\u4e0b\u6307\u4ee4\u8907\u88fd\u4e26\u8cbc\u4e0a\uff0c\u7136\u5f8c\u6309\u4e0b Enter\uff1a<\/p>\n\n\n\n<p>Bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)\"\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">&#x1f4a1; \u5b89\u88dd\u6ce8\u610f\u4e8b\u9805\uff1a<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5bc6\u78bc<\/strong>\uff1a\u904e\u7a0b\u4e2d\u6703\u8981\u6c42\u8f38\u5165 Mac \u7684\u958b\u6a5f\u5bc6\u78bc\uff08\u8f38\u5165\u6642\u756b\u9762\u4e0d\u6703\u986f\u793a\u661f\u865f\uff0c\u76f4\u63a5\u6253\u5b8c\u6309 Enter \u5373\u53ef\uff09\u3002<\/li>\n\n\n\n<li><strong>Xcode \u6307\u4ee4\u5de5\u5177<\/strong>\uff1a\u5b89\u88dd\u7a0b\u5f0f\u6703\u63d0\u793a\u4f60\u9700\u8981\u5b89\u88dd Xcode Command Line Tools\uff0c\u6309\u4e0b Enter \u540c\u610f\u5373\u53ef\u3002<\/li>\n\n\n\n<li><strong>Next Steps (\u91cd\u8981)<\/strong>\uff1a\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0c\u7d42\u7aef\u6a5f\u6703\u51fa\u73fe\u5e7e\u884c\u00a0<code>Next steps<\/code>\u00a0\u7684\u63d0\u793a\uff08\u901a\u5e38\u662f 2-3 \u884c\u547d\u4ee4\uff09\u3002<strong>\u8acb\u52d9\u5fc5\u8907\u88fd\u4e26\u57f7\u884c\u90a3\u5e7e\u884c\u6307\u4ee4<\/strong>\uff0c\u5426\u5247\u6703\u51fa\u73fe\u00a0<code>brew: command not found<\/code>\u00a0\u7684\u932f\u8aa4\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2. \u5e38\u7528\u57fa\u672c\u6307\u4ee4<\/h2>\n\n\n\n<p>\u5b78\u6703\u9019\u5e7e\u500b\u6307\u4ee4\uff0c\u4f60\u5c31\u80fd\u61c9\u4ed8 90% \u7684\u9700\u6c42\u4e86\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>\u6307\u4ee4<\/strong><\/td><td><strong>\u7528\u9014<\/strong><\/td><td><strong>\u7bc4\u4f8b<\/strong><\/td><\/tr><\/thead><tbody><tr><td><code>brew search [\u540d\u7a31]<\/code><\/td><td><strong>\u641c\u5c0b<\/strong>&nbsp;\u8edf\u9ad4<\/td><td><code>brew search git<\/code><\/td><\/tr><tr><td><code>brew install [\u540d\u7a31]<\/code><\/td><td><strong>\u5b89\u88dd<\/strong>&nbsp;\u8edf\u9ad4<\/td><td><code>brew install wget<\/code><\/td><\/tr><tr><td><code>brew list<\/code><\/td><td><strong>\u5217\u51fa<\/strong>&nbsp;\u6240\u6709\u5df2\u5b89\u88dd\u8edf\u9ad4<\/td><td><code>brew list<\/code><\/td><\/tr><tr><td><code>brew uninstall [\u540d\u7a31]<\/code><\/td><td><strong>\u5378\u8f09<\/strong>&nbsp;\u8edf\u9ad4<\/td><td><code>brew uninstall wget<\/code><\/td><\/tr><tr><td><code>brew update<\/code><\/td><td><strong>\u66f4\u65b0<\/strong>&nbsp;Homebrew \u81ea\u5df1<\/td><td><code>brew update<\/code><\/td><\/tr><tr><td><code>brew upgrade<\/code><\/td><td><strong>\u5347\u7d1a<\/strong>&nbsp;\u6240\u6709\u5df2\u5b89\u88dd\u7684\u8edf\u9ad4<\/td><td><code>brew upgrade<\/code><\/td><\/tr><tr><td><code>brew cleanup<\/code><\/td><td><strong>\u6e05\u7406<\/strong>&nbsp;\u820a\u7248\u672c\u7684\u66ab\u5b58\u6a94<\/td><td><code>brew cleanup<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3. \u9032\u968e\uff1aHomebrew Cask (\u5b89\u88dd\u4e00\u822c\u8edf\u9ad4)<\/h2>\n\n\n\n<p>\u9664\u4e86\u958b\u767c\u5de5\u5177\uff08\u5982 Python, Git\uff09\uff0cHomebrew \u4e5f\u80fd\u5b89\u88dd\u5e36\u5716\u5f62\u4ecb\u9762\u7684\u8edf\u9ad4\uff08\u5982 Google Chrome, VS Code, Discord\uff09\u3002\u9019\u985e\u8edf\u9ad4\u7a31\u70ba&nbsp;<strong>Cask<\/strong>\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5b89\u88dd\u7bc4\u4f8b<\/strong>\uff1aBash<code>brew install --cask google-chrome brew install --cask visual-studio-code<\/code><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4. \u81ea\u6211\u6aa2\u67e5<\/h2>\n\n\n\n<p>\u5982\u679c\u4e0d\u78ba\u5b9a Homebrew \u662f\u5426\u5b89\u88dd\u6b63\u78ba\uff0c\u6216\u662f\u904b\u4f5c\u4e0a\u6709\u9ede\u602a\u602a\u7684\uff0c\u53ef\u4ee5\u57f7\u884c\u300c\u91ab\u751f\u300d\u6307\u4ee4\u5e6b\u4f60\u8a3a\u65b7\uff1a<\/p>\n\n\n\n<p>Bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>brew doctor\n<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u5982\u679c\u770b\u5230&nbsp;<strong>&#8220;Your system is ready to brew.&#8221;<\/strong>\uff0c\u606d\u559c\u4f60\uff0c\u4e00\u5207\u6b63\u5e38\uff01<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Homebrew \u662f Mac \u4e0a\u6700\u5f37\u5927\u7684\u5957\u4ef6\u7ba1\u7406\u5de5\u5177\uff0c\u7c21\u55ae\u4f86\u8aaa\uff0c\u5b83\u5c31\u50cf\u662f\u958b\u767c\u8005\u7248\u7684\u300cApp Store\u300d\uff0c\u8b93\u4f60\u900f\u904e\u4e00\u884c\u6307\u4ee4\u5c31\u80fd\u5b89\u88dd\u5404\u7a2e\u8edf\u9ad4\u548c\u958b\u767c\u5de5\u5177\u3002 \u4ee5\u4e0b\u662f\u70ba\u4f60\u6574\u7406\u7684\u7c21\u6613\u6559\u5b78\uff1a 1. \u5b89\u88dd Homebrew \u8acb\u6253\u958b\u4f60\u7684\u300c\u7d42\u7aef\u6a5f\u300d(Terminal)\uff0c\u5c07\u4ee5\u4e0b\u6307\u4ee4\u8907\u88fd\u4e26\u8cbc\u4e0a\uff0c\u7136\u5f8c\u6309\u4e0b Enter\uff1a Bash &#x1f4a1; \u5b89\u88dd\u6ce8\u610f\u4e8b\u9805\uff1a 2. \u5e38\u7528\u57fa\u672c\u6307\u4ee4 \u5b78\u6703\u9019\u5e7e\u500b\u6307\u4ee4\uff0c\u4f60\u5c31\u80fd\u61c9\u4ed8 90% \u7684\u9700\u6c42\u4e86\uff1a \u6307\u4ee4 \u7528\u9014 \u7bc4\u4f8b brew search [\u540d\u7a31] \u641c\u5c0b&nbsp;\u8edf\u9ad4 brew search git brew install [\u540d\u7a31] \u5b89\u88dd&nbsp;\u8edf\u9ad4 brew install wget brew list \u5217\u51fa&nbsp;\u6240\u6709\u5df2\u5b89\u88dd\u8edf\u9ad4 brew list brew uninstall [\u540d\u7a31] \u5378\u8f09&nbsp;\u8edf\u9ad4 brew uninstall wget brew update \u66f4\u65b0&nbsp;Homebrew \u81ea\u5df1 brew update brew &hellip; <a href=\"http:\/\/www.banbanli.net\/blog\/?p=3691\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">HomeBrew 101<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-3691","post","type-post","status-publish","format-standard","hentry","category-daily"],"_links":{"self":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3691","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3691"}],"version-history":[{"count":1,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3691\/revisions"}],"predecessor-version":[{"id":3692,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3691\/revisions\/3692"}],"wp:attachment":[{"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3691"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.banbanli.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}