解决Macos下brew无法更新chrome的问题

2018-02-05 10:29:41来源:oschina作者:Nemesis_E人点击

分享

最近看到chrome64出来了就使用brew cask 更新,然而报错,使用brew-cask删除chrome也报同样的错误:


==> Moving App 'Google Chrome.app' back to '/usr/local/Caskroom/google-chrome/latest/Google Chrome.app'.
Error: Permission denied @ rb_file_s_rename - (/Applications/Google Chrome.app, /usr/local/Caskroom/google-chrome/latest/Google Chrome.app)
Follow the instructions here:
https://github.com/caskroom/homebrew-cask#reporting-bugs
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:528:in `rename'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:528:in `block in mv'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1571:in `block in fu_each_src_dest'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1587:in `fu_each_src_dest0'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1569:in `fu_each_src_dest'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:517:in `mv'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/moved.rb:69:in `move_back'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/moved.rb:15:in `uninstall_phase'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:403:in `block in uninstall_artifacts'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/set.rb:674:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/set.rb:674:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:400:in `uninstall_artifacts'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:353:in `uninstall'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/uninstall.rb:22:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/uninstall.rb:12:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/uninstall.rb:12:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb:35:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:98:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:168:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:132:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `
'

查看了下/Applications目录发现chrome的用户和组都很奇怪,并不像其他用brew安装的程序


drwxr-xr-x@3 rootwheel96B Feb1 11:00 Google Chrome.app
drwxr-xr-x 3 rootadmin96B Nov 26 23:02 VirtualBox.app

vbox是可以正常更新的,于是修改了chrome的组仍然无法解决, 遂删除之


cd /Applications/
sudo rm -rf Google/ Chrome.app/

在使用brew-cask重新安装brew cask reinstall google-chrome


$ brew cask reinstall google-chrome
==> Satisfying dependencies
==> Downloading https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg
Already downloaded: /Users/eddy/Library/Caches/Homebrew/Cask/google-chrome--64.0.3282.140.dmg
==> Verifying checksum for Cask google-chrome
==> Uninstalling Cask google-chrome
==> Purging files for version latest of Cask google-chrome
==> Installing Cask google-chrome
==> Moving App 'Google Chrome.app' to '/Applications/Google Chrome.app'.

最新文章

123

最新摄影

闪念基因

微信扫一扫

第七城市微信公众平台