brew cask install android-sdk
警告:已经安装了一个用于android-sdk的Cask。
brew cask reinstall android-sdk
或
brew cask uninstall android-sdk
==>警告我们将为您安装android-sdk-tools,platform-tools和build-tools。你可以通过控制android sdk包 sdkmanager命令。您可能需要添加到自己的个人资料中:'导出 ANDROID_HOME =的/ usr /本地/共享/ Android的SDK'
此操作最多可能需要10分钟,具体取决于您的互联网 连接。请耐心等待。
==>正在下载https://dl.google.com/android/repository/tools_r25.2.3-macosx.zip 已经下载: /Users/ishandutta2007/Library/Caches/Homebrew/Cask/android-sdk--25.2.3.zip ==>验证Cask android-sdk的校验和错误:没有这样的文件或目录 - / usr / local / share / android-sdk按照这里的说明操作: https://github.com/caskroom/homebrew-cask#reporting-bugs /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1439:in remove_file'中的
unlink' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1439:in
阻止 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1444:inplatform_support' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1438:in
remove_file' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:785:inremove_file' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:563:in
阻止rm' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:562:ineach' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:562:in
RM' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:57:inblock (2 levels) in load' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/abstract_flight_block.rb:35:in
instance_eval的' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/abstract_flight_block.rb:35:inblock in abstract_phase' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/set.rb:232:in
each_key' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/set.rb:232:ineach' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/abstract_flight_block.rb:34:in
abstract_phase' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/abstract_flight_block.rb:28:in uninstall_artifacts中的uninstall_phase' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:330:in
阻止' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:327:ineach' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:327:in
uninstall_artifacts' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:312:in {_ 1}}阻止了install_casks' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb:6:inuninstall' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb:27:in
install_casks' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:10:ineach' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb:6:in
run_command' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:158:inrun' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:115:in
木桶' /usr/local/Homebrew/Library/Homebrew/brew.rb:91:in`'
尝试this但没有运气,我没有删除此问题中提及的任何内容。
答案 0 :(得分:2)
我没有发现错误说明的目录/usr/local/share/android-sdk
:
$ sudo find /usr -name "android-sdk"
/usr/local/Caskroom/android-sdk
我也遇到了这些错误:
Error: It seems there is already a Binary at '/usr/local/bin/adb'; not linking.
Error: It seems there is already a Binary at '/usr/local/bin/fastboot'; not linking.
我删除了上述文件,然后才能安装:
$ rm -rf /usr/local/Caskroom/android-sdk
$ rm -rf /usr/local/bin/adb
$ rm -rf /usr/local/bin/fastboot
$ brew cask install android-sdk
答案 1 :(得分:0)
在最近将android-sdk重新定位到caskroom / cask之后我遇到了一个非常类似的问题,设法破坏了我的一个安装脚本。我最后通过直接用cask安装的目录(/ usr / local / share / android-sdk,/ usr / local / opt / android-sdk等)来修复它。我删除了那里或创建了空目录,然后重新运行删除/重新安装/删除命令最终工作。对不起,我不能更具体,但这基本上是让我的目录看起来像brew预期看起来的情况。