2017-04-16 41 views
2
brew cask install android-sdk 

Warning: A Cask for android-sdk is already installed.無法重新安裝或卸載破沖泡包(沒有刪除任何東西)

brew cask reinstall android-sdk 

brew cask uninstall android-sdk 

==> Caveats We will install android-sdk-tools, platform-tools, and build-tools for you. You can control android sdk packages via the sdkmanager command. You may want to add to your profile: 'export ANDROID_HOME=/usr/local/share/android-sdk'

This operation may take up to 10 minutes depending on your internet connection. Please, be patient.

==> Downloading https://dl.google.com/android/repository/tools_r25.2.3-macosx.zip Already downloaded: /Users/ishandutta2007/Library/Caches/Homebrew/Cask/android-sdk--25.2.3.zip ==> Verifying checksum for Cask android-sdk Error: No such file or directory - /usr/local/share/android-sdk Follow the instructions here: 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 unlink' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1439:in block in remove_file' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:1444:in platform_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:in remove_file' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:563:in block in rm' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:562:in each' /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:in block (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:in block 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:in each' /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_phase' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:330:in block in uninstall_artifacts' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:327:in each' /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 uninstall' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb:27:in block in install_casks' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb:6:in each' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb:6:in install_casks' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:10:in run' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:115:in run_command' /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:158:in process' /usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in cask' /usr/local/Homebrew/Library/Homebrew/brew.rb:91:in `'

嘗試this但沒有運氣,我沒有刪除任何東西就像這個問題中提到的那樣

+0

我得到我的問題,通過安裝AndroidStudio排序,然後設置ANDROID_HOME和PATH變量這裏提到http://stackoverflow.com/a/19986294/865220,但問題應該保持開放,因爲我無法讓它使用自制工作 – ishandutta2007

+1

同樣的問題在這裏 –

回答

0

我最近將android-sdk重新安裝到caskroom/cask後,發現了一個非常類似的問題,它破壞了我的一個安裝腳本。我最終通過手動直接與木桶安裝的目錄(/ usr/local/share/android-sdk,/ usr/local/opt/android-sdk等)混淆來修復它。我刪除了那裏或創建了空目錄,然後重新運行remove/reinstall/delete命令。對不起,我不能更具體,但它基本上是讓我的目錄看起來像brew預計他們看起來的情況。

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 
相關問題