brew无法找到任何包

问题描述

硬盘驱动器故障后,我刚从商店购买了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.

怎么了?

解决方法

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

我的 homebrew-core 不在 master 分支。

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

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

,

酿造搜索结果

$ 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

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...