brew install chromedriver
安装遇到问题:
Git must be installed and in your PATH
安装git,按照官网要先安装homebrew:https://brew.sh/
/bin/bash-c"$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
又遇到问题:Failed to connect to raw.githubusercontent.com port 443: Connection refused
修改hosts:
sudo vi /etc/hosts
199.232.4.133 raw.githubusercontent.com
再次遇到github访问问题
修改hosts:
140.82.112.4 github.com
199.232.69.194 github.global.ssl.fastly.net
185.199.108.153 assets-cdn.github.com
185.199.109.153 assets-cdn.github.com
185.199.110.153 assets-cdn.github.com
185.199.111.153 assets-cdn.github.com
又碰到问题:
homebrew-core is a shallow clone.
To `brew update`, first run:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
解决:
cd /usr/local/Homebrew/Library/Taps/homebrew
rm -rf homebrew-core
brew upgrade
又提示错误:
unable to access 'https://github.com/Homebrew/brew/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
和
Failed to import: /usr/local/Homebrew/Library/Taps/ethereum/homebrew-ethereum/ethereum.rb#这个关于以太坊的可以忽略。
#也可以执行:
brew tap ethereum/ethereum
brew install ethereum
安装
解决:
git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core--depth=1
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
brew update
brew install git
git config --global user.name "your_name"
git config --global user.email "your_email@gmail.com"
git config core.ignorecase false
终于可以安装chromedriver:
brew install chromedriver
如果出现:
UpdatingHomebrew...==>Auto-updated Homebrew!Updated1tap(homebrew/core).==>NewFormulae.........此处省去一万行..........Error:Noavailable formula with the name"chromedriver"Itwas migratedfromhomebrew/core to homebrew/cask.Youcan access it again by running:brew tap homebrew/caskAndthen you can install it by running:brew cask install chromedriver
执行:
brew cask install chromedriver
不要用手动安装,MacOS升级到Big Sur后,不能mount根目录!