43

我正在尝试使用 brew-cask 安装虚拟盒,但这会返回这种错误并且我无法安装虚拟盒。我使用 MacOSX Lion 10.7.5 和 homebrew 0.9.5,ruby 2.1.0-p0

我在下面的终端中描述了这个过程。

首先,brew tap命令成功。

    $ brew tap phinze/cask
    Cloning into '/usr/local/Library/Taps/phinze/homebrew-cask'...
    remote: Reusing existing pack: 32538, done.
    remote: Counting objects: 36, done.
    remote: Compressing objects: 100% (36/36), done.
    remote: Total 32574 (delta 16), reused 2 (delta 0)
    Receiving objects: 100% (32574/32574), 11.72 MiB | 379 KiB/s, done.
    Resolving deltas: 100% (19138/19138), done.
    Tapped 1 formula
    It looks like you tapped a private repository. To avoid entering your
    credentials each time you update, you can use git HTTP credential caching
    or issue the following command:

      cd /usr/local/Library/Taps/phinze/homebrew-cask
      git remote set-url origin git@github.com:phinze/homebrew-cask.git

其次,我已经安装了 brew-cask 如下

    $ brew install brew-cask
    Warning: brew-cask-0.35.0 already installed

第三,当我尝试安装virtualbox时,它返回这种错误,我无法安装Virtualbox。

    $ brew cask install virtualbox
    ==> Removing legacy Tap
    Error: No available cask for virtualbox
4

5 回答 5

77

homebrew-cask 存储库已移动. 你试过了吗:

brew tap caskroom/cask
brew install brew-cask
brew cask install virtualbox

而不是 phinz?

更新:

正如 Jon Nalley 指出的那样,brew install brew-cask现在已弃用

2015 年 12 月重要更新:Homebrew-Cask 现在将与 Homebrew 一起保持最新(有关详细信息,请参阅 #15381)。如果您还没有,请运行brew uninstall --force brew-cask; brew update以切换到新系统。

于 2014-05-22T01:47:09.917 回答
9
brew tap caskroom/cask
brew install brew-cask
brew cask install virtualbox

为我工作。

于 2015-06-10T07:05:37.953 回答
1

起初,我收到“多次点击”错误:

~ $ brew install brew-cask
Error: Formulae found in multiple taps:
 * caskroom/cask/brew-cask
 * phinze/cask/brew-cask

然后,我包含了 brew-cask 的完整(caskroom)路径并且它起作用了:

 brew install caskroom/cask/brew-cask
 brew cask install virtualbox
于 2015-12-28T17:13:23.703 回答
1
brew install caskroom/cask/brew-cask
brew install homebrew/completions/brew-cask-completion

这对我有用

于 2016-12-09T08:38:47.943 回答
0

截至 2021 年 3 月,此问题的答案是使用 cask 命令,如下所示:

brew install --cask <anypackage>

例如:

brew install --cask virtualbox
于 2021-03-19T07:58:40.137 回答