MVN期望ASDF的较旧版本
当我尝试运行MVN验证
时,我会收到以下错误。
/Users/syncmaster/.asdf/shims/mvn: line 3: /usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: No such file or directory
/Users/syncmaster/.asdf/shims/mvn: line 3: exec: /usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: cannot execute: No such file or directory
的详细信息
ASDF ASDF版本
$asdf --version
v0.10.1
$whereis asdf
asdf: /usr/local/opt/asdf/libexec/bin/asdf
$ls /usr/local/Cellar/asdf
0.10.1
但是,这是BREW的
brew info asdf
asdf: stable 0.10.1 (bottled), HEAD
Extendable version manager with support for Ruby, Node.js, Erlang & more
https://asdf-vm.com/
/usr/local/Cellar/asdf/0.10.1 (168 files, 714.3KB) *
Poured from bottle on 2022-05-19 at 10:42:28
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/asdf.rb
:我的.zshrc
具有以下行。
. /usr/local/opt/asdf/libexec/asdf.sh
如何修复我的ASDF版本,以便Maven使用正确的版本?
When I try to run mvn validate
, I get the following error.
/Users/syncmaster/.asdf/shims/mvn: line 3: /usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: No such file or directory
/Users/syncmaster/.asdf/shims/mvn: line 3: exec: /usr/local/Cellar/asdf/0.9.0/libexec/bin/asdf: cannot execute: No such file or directory
However here is the details of my asdf
ASDF Version
$asdf --version
v0.10.1
$whereis asdf
asdf: /usr/local/opt/asdf/libexec/bin/asdf
$ls /usr/local/Cellar/asdf
0.10.1
From brew:
brew info asdf
asdf: stable 0.10.1 (bottled), HEAD
Extendable version manager with support for Ruby, Node.js, Erlang & more
https://asdf-vm.com/
/usr/local/Cellar/asdf/0.10.1 (168 files, 714.3KB) *
Poured from bottle on 2022-05-19 at 10:42:28
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/asdf.rb
My .zshrc
has the following line.
. /usr/local/opt/asdf/libexec/asdf.sh
How can I fix my ASDF version so that maven uses the correct one?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过使用ASDF重新安装Maven来解决此问题。
这就是为什么我需要ASDF进行MAVEN安装的原因 - 我需要Maven 3.6.3,而Homebrew仅支持3.5和3.8。我不愿使用ASDF来照顾安装,而不是手动安装Maven。
卸载的小牛首先
重新安装了
I fixed this by reinstalling maven using asdf.
Here is why I need ASDF for my Maven installation - I need Maven 3.6.3 and homebrew only supports 3.5 and 3.8. Instead of installing Maven manually, I prefer using ASDF to take care of the installation.
Uninstalled Maven first
Reinstalled Maven