- 安装homebrew
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”- 安装adb
brew cask install android-platform-tools
- Failed to connect to raw.githubusercontent.com port 443: Connection refused
解决:
https://www.ipaddress.com/查询raw.githubusercontent.com的真实IP。在hosts文件中写入:真实IP raw.githubusercontent.com,可以写入多个(终端中vim /etc/hosts编辑)。
- sudo: /etc/sudoers is world writable
sudo: no valid sudoers sources found, quitting
解决:
1.在Mac中启动root 账户:
https://jingyan.baidu.com/article/49711c619e7620fa441b7ca8.html
2.切换到root用户,修改 /etc/sudoers的权限:
终端中:
su
Password:你自己设置的密码
sh-3.2# ls -l /etc/sudoers
-rwxrwxrwx 1 root wheel 1371 8 9 11:28 /etc/sudoers
sh-3.2# chmod 0440 /etc/sudoers
sh-3.2# ls -l /etc/sudoers
-r–r----- 1 root wheel 1371 8 9 11:28 /etc/sudoers
sh-3.2# exit
- LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
解决:
终端中执行:networksetup -setv6off Wi-Fi
- Error: /usr/local/Cellar is not writable. You should change the ownership and permissions of /usr/local/Cellar back to your user
account: sudo chown -R $(whoami) /usr/local/Cellar Failed during:
/usr/local/bin/brew update --force --quiet sudo:
/private/etc/sudoers.d is world writable
未解决,不影响使用
- Error: Unknown command: cask
解决:
使用brew install android-platform-tools
- Error: Permission denied @ dir_s_mkdir - /usr/local/Caskroom/android-platform-tools
解决:
sudo chown -R $(whoami):staff ~/Library/Caches/Homebrew /usr/local/Caskroom/
- E45: ‘readonly’ option is set (add ! to override)
切换到root用户,终端中输入sudo,并且保存时用:wq!命令