MVN期望ASDF的较旧版本

发布于 2025-01-31 19:21:57 字数 999 浏览 1 评论 0原文

当我尝试运行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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伤感在游骋 2025-02-07 19:21:57

我通过使用ASDF重新安装Maven来解决此问题。

这就是为什么我需要ASDF进行MAVEN安装的原因 - 我需要Maven 3.6.3,而Homebrew仅支持3.5和3.8。我不愿使用ASDF来照顾安装,而不是手动安装Maven。

卸载的小牛首先

asdf uninstall maven 3.6.3
asdf plugin remove maven

重新安装了

asdf list all maven 3.6
asdf install maven 3.6.3
asdf global maven 3.6.3

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

asdf uninstall maven 3.6.3
asdf plugin remove maven

Reinstalled Maven

asdf list all maven 3.6
asdf install maven 3.6.3
asdf global maven 3.6.3
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文