Mac安装adb遇到的问题总结

  1. 安装homebrew
    ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
  2. 安装adb
    brew cask install android-platform-tools
  1. 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编辑)。
  1. 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
  1. LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
    解决:
    终端中执行:networksetup -setv6off Wi-Fi
  1. 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

    未解决,不影响使用
  1. Error: Unknown command: cask
    解决:
    使用brew install android-platform-tools
  1. Error: Permission denied @ dir_s_mkdir - /usr/local/Caskroom/android-platform-tools
    解决:
    sudo chown -R $(whoami):staff ~/Library/Caches/Homebrew /usr/local/Caskroom/
  1. E45: ‘readonly’ option is set (add ! to override)
    切换到root用户,终端中输入sudo,并且保存时用:wq!命令
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

风铃峰顶

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值