gpt4 book ai didi

virtualbox - brew cask uninstall --force virtual box 给出错误 : undefined method `<=' for nil:NilClass

转载 作者:行者123 更新时间:2023-12-04 03:01:15 34 4
gpt4 key购买 nike

在 OSX El Captain 10.11.6 上,我有

$ VirtualBox --help
Oracle VM VirtualBox Manager 5.0.16

我正在尝试卸载 virtual box 但得到关注...

brew cask uninstall --force virtualbox
Error: undefined method `<=' for nil:NilClass
Did you mean? <=>
Follow the instructions here:
https://github.com/caskroom/homebrew-cask#reporting-bugs
/usr/local/Caskroom/virtualbox/.metadata/5.0.16-105871/20160414170649.906/Casks/virtualbox.rb:2:in `block in load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask.rb:23:in `instance_eval'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask.rb:23:in `initialize'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:29:in `new'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:29:in `cask'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:65:in `cask'
/usr/local/Homebrew/Library/Homebrew/compat/hbc/cask_loader.rb:10:in `cask'
/usr/local/Caskroom/virtualbox/.metadata/5.0.16-105871/20160414170649.906/Casks/virtualbox.rb:1:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:55:in `instance_eval'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:55:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:168:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/uninstall.rb:19: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 `<main>'

这是它提示的文件的第一行:

cat/usr/local/Caskroom/virtualbox/.metadata/5.0.16-105871/20160414170649.906/Casks/virtualbox.rb

cask 'virtualbox' do
if MacOS.release <= :lion

有什么想法吗?

最佳答案

打开终端并运行以下命令

brew update
brew cleanup

使用 brew 删除所有包

brew cask rm virtualbox --force
brew cask rm vagrant --force
brew cask rm vagrant-manager --force

删除任何可能丢失的现有软件包

rm -rf /Applications/Vagrant* /Applications/VirtualBox
sudo rm -f /usr/bin/vagrant /usr/local/bin/vagrant
sudo rm -rf /opt/vagrant /opt/homebrew-cask/Caskroom/va* /opt/homebrew-cask/Caskroom/virtualbox
rm -rf ~/.vagrant* ~/.docker ~/Virtual*
rm -rf /usr/local/Caskroom/virtualbox && rm -rf /Applications/VirtualBox.app/
sudo pkgutil --forget com.vagrant.vagrant

更新:如果您想重新安装它,请运行以下命令

brew cleanup
brew update --rebase
brew upgrade --cleanup
brew install vagrant-completion --force
brew cask install virtualbox --force
brew cask install vagrant --force
brew cask install vagrant-manager --force
brew upgrade --cleanup
brew cleanup
brew doctor
sudo shutdown -r now

关于virtualbox - brew cask uninstall --force virtual box 给出错误 : undefined method `<=' for nil:NilClass,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49040612/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com