【问题标题】:brew cannot find ANY packagesbrew 找不到任何包
【发布时间】:2020-12-31 21:35:06
【问题描述】:

硬盘驱动器出现故障后,我刚从商店买了我的 Mac Pro。我正在尝试再次安装我的环境。

我从自制网站上的当前链接安装自制软件:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

但我无法安装任何软件包。 Brew 找不到任何东西。

 ~ brew install rbenv
Error: No available formula with the name "rbenv"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

怎么了?

【问题讨论】:

    标签: macos homebrew rbenv


    【解决方案1】:

    酿造搜索结果

    $ brew search rbenv
    ==> Formulae
    rbenv                        rbenv-bundle-exec            rbenv-chefdk                 rbenv-default-gems           rbenv-vars
    rbenv-aliases                rbenv-bundler                rbenv-communal-gems          rbenv-gemset                 rbenv-whatis
    rbenv-binstubs               rbenv-bundler-ruby-version   rbenv-ctags                  rbenv-use
    

    安装 rbenv

    $ brew install rbenv
    ==> Downloading https://github.com/rbenv/ruby-build/archive/v20200819.tar.gz
    ==> Downloading from https://codeload.github.com/rbenv/ruby-build/tar.gz/v20200819
    ######################################################################## 100.0%
    ==> Downloading https://homebrew.bintray.com/bottles/rbenv-1.1.2.mojave.bottle.tar.gz
    ######################################################################## 100.0%
    ==> Installing dependencies for rbenv: ruby-build
    ==> Installing rbenv dependency: ruby-build
    ==> ./install.sh
    ==> Caveats
    ruby-build installs a non-Homebrew OpenSSL for each Ruby version installed and these are never upgraded.
    
    To link Rubies to Homebrew's OpenSSL 1.1 (which is upgraded) add the following
    to your /Users/rchen/.bash_profile:
      export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
    
    Note: this may interfere with building old versions of Ruby (e.g <2.4) that use
    OpenSSL <1.1.
    ==> Summary
    ?  /usr/local/Cellar/ruby-build/20200819: 509 files, 253.6KB, built in 5 seconds
    ==> Installing rbenv
    ==> Pouring rbenv-1.1.2.mojave.bottle.tar.gz
    ?  /usr/local/Cellar/rbenv/1.1.2: 36 files, 65KB
    ==> Caveats
    ==> ruby-build
    ruby-build installs a non-Homebrew OpenSSL for each Ruby version installed and these are never upgraded.
    
    To link Rubies to Homebrew's OpenSSL 1.1 (which is upgraded) add the following
    to your /Users/rchen/.bash_profile:
      export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
    
    Note: this may interfere with building old versions of Ruby (e.g <2.4) that use
    OpenSSL <1.1.
    

    版本测试

    $ rbenv --version
    rbenv 1.1.2
    

    【讨论】:

    • 是的,我试过了(抱歉,由于某种原因无法将其格式化为代码)~ brew search rbenv 没有找到“rbenv”的公式或木桶。已关闭的拉取请求:...(太长)
    • 顺便说一句,我设法通过使用 rbenv 存储库而不是 brew 来安装 rbenv 和 ruby​​,但 brew 仍然无法正常工作。
    【解决方案2】:

    我遇到了同样的问题,我可以通过运行医生命令并按照需要在那里更新的步骤来解决它。

    我的 homebrew-core 不在 master 分支。

    brew doctor 
    git -C $(brew --repo homebrew/core) checkout master
    

    就是这样。之后,我就可以运行 rbenv install 命令了。

    【讨论】:

      猜你喜欢
      • 2020-11-20
      • 2015-06-24
      • 2020-10-17
      • 2016-02-08
      • 1970-01-01
      • 1970-01-01
      • 2021-06-18
      • 2013-12-24
      • 1970-01-01
      相关资源
      最近更新 更多