gradle - brew 不安装 gradle 6
问题描述
除了使用 brew 安装 gradle 7 之外,我无法安装任何东西。 https://formulae.brew.sh/formula/gradle#default
如何下载旧版本作为 google 中的答案在最新的 brew 中不起作用。最好没有 sdkman,因为我不想要另一个包管理器。
命令brew search gradle
只显示一个版本的 gradle。
使用的命令
brew install gradle
brew install gradle@6
解决方案
brew install gradle@6
我按照输出中的说明设法让 gradle 6.x 工作
==> Caveats
gradle@6 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have gradle@6 first in your PATH, run:
echo 'export PATH="/usr/local/opt/gradle@6/bin:$PATH"' >> ~/.profile
更新后~/.profile
重新加载
source ~/.profile
或打开新的终端会话。
推荐阅读
- amazon-web-services - 使用 codebuild 将从 aws ssm 参数获取的文件内容复制到容器
- flutter - 如何更改charts_flutter中的标记点大小?
- docker - 如何在 GitHub 操作中等待容器健康?
- laravel - Laravel 中没有定义路由登录
- dashboard - 打开仪表板时如何在 cognos 11 仪表板的过滤器中设置默认值?
- memory - 使用newlib nano malloc时sbrk的增量值从何而来?
- api - (POST)rest API的请求正文中的数组与哈希图
- css - 尽管 CSS 在其他邮件客户端中工作,但 CSS 在 Outlook 中不起作用
- sql - 在合并单独表中的字段时查找销售额总和的最大值
- angular - 检测 element.nativeElement 角度上的滚动事件