当前位置:网站首页>Homewbrew installation, common commands and installation path
Homewbrew installation, common commands and installation path
2022-04-23 15:58:00 【aserendipper】
One 、 install
1、homebrew What is it? ?
Homebrew Is a Mac OS Software package management tools under the platform , Own installation 、 uninstall 、 to update 、 see 、 Search and many other practical functions . A simple command , Package management can be realized , You don't have to worry about dependencies and file paths , It's very convenient .
2、 install homebrew
homebrew Installation is introduced on the official website homebrew Just one script .
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
After entering this command through the terminal , Connection rejection will occur .
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
Solution one
- modify hosts file , Add the following to hosts At the end of the middle .
sudo vi /etc/hosts
199.232.68.133 raw.githubusercontent.com
199.232.68.133 user-images.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com
- Re enter the installation script , Make a cup of milk tea , Static Download ( It takes a long time ).
Solution two
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
- The above script uses the image of China University of science and technology to speed up access .
If the command execution is stuck in the following information :
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
Control + c Interrupt the script execution and run the following command :
cd "$(brew --repo)/Library/Taps/"
mkdir homebrew && cd homebrew
git clone git://mirrors.ustc.edu.cn/homebrew-core.git
After successful execution, continue to execute the installation command :
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
3、 Enter the command brew -v
Verify that the installation was successful .
Two 、 Common commands
Use the following command to git Operation as an example
brew -v see homebrew Installed version
brew --help Simple command help
man brew Full command help
brew search git Search package
brew install git Install package
brew uninstall git Uninstall the installation package
brew list Displays all installed packages
brew list git Check the installation address of the installation package
brew pin git Lock packages you don't want to update
brew unpin git Unlock packages you don't want to update
brew outdated Check which installed packages need to be updated and the update status
brew update Synchronize remote updates , It has installed and updated software for this machine * mark
brew upgrade git Update individual packages
brew info git View package information
brew home git Visit the official website of the software package
brew cleanup -n Check out older packages that can be cleaned up , Do not perform actual operations
brew cleanup Clean up historical versions of all installed packages
brew cleanup git Clean up historical versions of individual installed packages
3、 ... and 、homebrew The installation path
/usr/local/Cellar all homebrew Installed programs , Are subject to [ The program name / Version number ] Stored in this directory
/usr/local/bin Launch link for storing all installation programs ( It's like a shortcut )
/usr/local/etc The default storage path of the configuration file of the installer
/usr/local/opt homebrew Download package storage path
/usr/local/Homebrew homebrew Own storage folder
版权声明
本文为[aserendipper]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231557110699.html
边栏推荐
猜你喜欢
随机推荐
Deletes the least frequently occurring character in the string
C, calculation method and source program of bell number
Tencent offer has been taken. Don't miss the 99 algorithm high-frequency interview questions. 80% of them are lost in the algorithm
PS为图片添加纹理
Grbl learning (I)
【第5节 if和for】
【现代电子装联期末复习要点】
Go concurrency and channel
ESP32_Arduino
捡起MATLAB的第(8)天
Spark 算子之coalesce与repartition
shell_2
Calculate the number of occurrences of a character
One brush 313 sword finger offer 06 Print linked list from end to end (E)
Win11/10家庭版禁用Edge的inprivate浏览功能
Method 2 of drawing ROC curve in R language: proc package
Load Balancer
为啥禁用外键约束
Compile, connect -- Notes
js正则判断域名或者IP的端口路径是否正确