gpt4 book ai didi

gradle - Homebrew 将不会安装任何东西,我也无法手动安装gradle

转载 作者:行者123 更新时间:2023-12-03 05:38:44 28 4
gpt4 key购买 nike

我正在尝试安装gradle,以便可以在Java程序上使用build.gradle文件。应该可以使用简单的brew install gradle完成此操作,但这会产生错误。

因此,我手动安装了,但是每当我执行gradle -vgradle -version时,它都会显示-bash: gradle: command not found。所以我的主要问题是如何修复自制程序,以便它可以真正为我安装东西,如果无法解决,那么手动安装在哪里出错了?等等)

这是尝试自制安装和输出的示例:

$ brew install gradle
/usr/local/Homebrew/Library/Homebrew/PATH.rb:71:in `split': invalid byte sequence in UTF-8 (ArgumentError)
from /usr/local/Homebrew/Library/Homebrew/PATH.rb:71:in `block in parse'
from /usr/local/Homebrew/Library/Homebrew/PATH.rb:71:in `each'
from /usr/local/Homebrew/Library/Homebrew/PATH.rb:71:in `flat_map'
from /usr/local/Homebrew/Library/Homebrew/PATH.rb:71:in `parse'
from /usr/local/Homebrew/Library/Homebrew/PATH.rb:8:in `initialize'
from /usr/local/Homebrew/Library/Homebrew/global.rb:106:in `new'
from /usr/local/Homebrew/Library/Homebrew/global.rb:106:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/brew.rb:17:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/brew.rb:17:in `<main>'

当我输入 opt/gradle.bashrc时,我应该看到我确实有gradle,并且可以使用它来构建Java项目。

最佳答案

您的Homebrew安装似乎已损坏。尝试使用以下方法卸载它:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

并使用以下命令重新安装它:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

关于gradle - Homebrew 将不会安装任何东西,我也无法手动安装gradle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54374570/

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