鐢?Homebrew 甯﹂浣犵殑 Mac

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了鐢?Homebrew 甯﹂浣犵殑 Mac相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/nbsp' title='nbsp'>nbsp   鐜   pre   鍝簺   emc   memcached   鎴愬姛   remove   

Homebrew涔熺Оbrew锛?code>macOS涓嬪熀浜庡懡浠よ鐨勬渶寮哄ぇ杞欢鍖呯鐞嗗伐鍏凤紝浣跨敤Ruby璇█寮€鍙戙€傜被浼间簬CentOS鐨?code>yum鎴栬€?code>Ubuntu鐨?code>apt-get锛?code>brew鑳芥柟渚跨殑绠$悊杞欢鐨勫畨瑁呫€佹洿鏂般€佸嵏杞斤紝鐪佸幓浜嗘墜鍔ㄧ紪璇戞垨鎷栧姩瀹夎鐨勪笉渚匡紝鏇翠娇寰楄蒋浠剁殑绠$悊鏇村姞闆嗕腑鍖栵紝瑙e喅浜嗕緷璧栧寘绠$悊鐨勭儲鎭笺€?/p>

瀹夎

Homebrew 渚濊禆浜?code>Xcode Command Line Tools锛屾墍浠ラ渶鍏堟墽琛岋細

1
xcode-select --install

鍦ㄧ粓绔腑鎵ц锛?/p>

1
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

妫€鏌ユ槸鍚﹀凡瀹夎鎴愬姛锛?/p>

1
2
3
4
$ brew -v

Homebrew 1.6.1
Homebrew/homebrew-core (git revision 0aeb7; last commit 2018-04-12)

 

鍩烘湰鐢ㄦ硶

銆€銆€鍩轰簬brew瀹夎鐨勬墍鏈夎蒋浠跺強鍏朵緷璧栧潎浼氬畨瑁呭埌鐩綍/usr/local/Cellar

  • Brew 甯姪淇℃伅

 

$ brew help
    
Example usage:
  brew search [TEXT|/REGEX/]
  brew info [FORMULA...]
  brew install FORMULA...
  brew update
  brew upgrade [FORMULA...]
  brew uninstall FORMULA...
  brew list [FORMULA...]
    
Troubleshooting:
  brew config
  brew doctor
  brew install --verbose --debug FORMULA
    
Contributing:
  brew create [URL [--no-fetch]]
  brew edit [FORMULA...]
    
Further help:
  brew commands
  brew help [COMMAND]
  man brew
  https://docs.brew.sh
  • 瀛愬懡浠ゅ府鍔╀俊鎭?nbsp;brew help [COMMAND]鎴?code>brew [COMMAND] -h 鐢ㄤ簬鏌ョ湅鍏蜂綋鏌愪釜瀛愬懡浠ょ殑甯姪淇℃伅銆?/li>
  • 鏈嶅姟绠$悊 brew services 鐢ㄤ簬鏂逛究鐨勭鐞?brew 瀹夎鐨勮蒋浠惰蒋浠讹紝绫讳技浜?Linux 涓嬬殑 service 鍛戒护銆?/li>
  • 鏌ョ湅brew services甯姪淇℃伅锛?/li>
$ brew services
    
brew services command:
    Integrates Homebrew formulae with macOS鈥?launchctl manager.
    
    [sudo] brew services list
    List all running services for the current user (or root)
    
    [sudo] brew services run formula|--all
    Run the service formula without starting at login (or boot).
    
    [sudo] brew services start formula|--all
    Start the service formula immediately and register it to launch at login (or boot).
    
    [sudo] brew services stop formula|--all
    Stop the service formula immediately and unregister it from launching at login (or boot).
    
    [sudo] brew services restart formula|--all
    Stop (if necessary) and start the service immediately and register it to launch at login (or boot).
    
    [sudo] brew services cleanup
    Remove all unused services.
    
    If sudo is passed, operate on /Library/LaunchDaemons (started at boot).
    Otherwise, operate on ~/Library/LaunchAgents (started at login).
  • 鏌ヨ鏈嶅姟鍒楄〃锛?/li>
$ brew services list
    
Name      Status  User    Plist
redis     stopped
php56     started shocker /usr/local/opt/php56/homebrew.mxcl.php56.plist
mongodb   started shocker /usr/local/opt/mongodb/homebrew.mxcl.mongodb.plist
memcached stopped
httpd     stopped
nginx     started shocker /usr/local/opt/nginx/homebrew.mxcl.nginx.plist
etcd      stopped
mysql@5.6 started shocker /usr/local/opt/mysql@5.6/homebrew.mxcl.mysql@5.6.plist
  • 妫€鏌ュ彲鏇存柊鐨勮蒋浠跺垪琛?nbsp;brew outdated 鍙煡璇㈡湁鏇存柊鐗堟湰鐨勮蒋浠?/li>
brew outdated
wget (1.18) < 1.19.4_1
redis (3.2.8) < 4.0.9
brotli (1.0.3) < 1.0.4
glib (2.56.0) < 2.56.1
etcd (3.2.6) < 3.3.3
tmux (2.3_2) < 2.6
openssl@1.1 (1.1.0e) < 1.1.0h
mysql@5.6 (5.6.34) < 5.6.39
libzip (1.5.0) < 1.5.1
bash-completion (1.3_1) < 1.3_3
  • 娓呯悊杞欢 brew cleanup -n 鍒楀嚭闇€瑕佹竻鐞嗙殑鍐呭 brew cleanup 娓呯悊鎵€鏈夌殑杩囨椂杞欢 brew cleanup [FORMULA] 娓呯悊鎸囧畾杞欢鐨勮繃鏃跺寘
  •  鏌ョ湅閰嶇疆淇℃伅 brew config 鐢ㄤ簬鏌ョ湅 brew 鎵€鍦ㄧ幆澧冨強鐩稿叧鐨勯厤缃儏鍐?/li>
  • 璇婃柇闂 brew doctor 璇婃柇褰撳墠 brew 瀛樺湪鍝簺闂锛屽苟缁欏嚭瑙e喅鏂规

  • 浠撳簱绠$悊 brew tap 宸插畨瑁呯殑浠撳簱鍒楄〃 

$ brew tap
    
Updating Homebrew...
caskroom/cask
homebrew/core
homebrew/services
peckrob/php
phinze/cask

brew tap [--full] user/repo [URL] 娣诲姞浠撳簱

brew untap tap 绉婚櫎浠撳簱

 

 

以上是关于鐢?Homebrew 甯﹂浣犵殑 Mac的主要内容,如果未能解决你的问题,请参考以下文章

AI澶ф暟鎹娴嬩綘鏈潵鐨勫彟涓€鍗婏紒鍑嗗埌娌℃湅鍙嬶紒

鏄殑锛佷竴绡囨枃绔犲氨鑳藉甫浣犵湅瀹孼ooKeeper锛?/h1>

mac安装homebrew失败怎么办