.net - dotnet --version 给出 "the folder [/usr/local/share/dotnet/host/fxr] does not contain any version-numbered child folders"

标签 .net macos ssl terminal command

当我运行 dotnet --version在我的 Mac 上的终端中,它给出了一个错误:

A fatal error occurred, the folder [/usr/local/share/dotnet/host/fxr] does not contain any version-numbered child folders


它可以找到dotnet可执行,但 --version不管用:
anasmahdi@Anass-Air ~ % dotnet

Usage: dotnet [options]
Usage: dotnet [path-to-application]

Options:
  -h|--help         Display help.
  --info            Display .NET information.
  --list-sdks       Display the installed SDKs.
  --list-runtimes   Display the installed runtimes.

path-to-application:
  The path to an application .dll file to execute.
anasmahdi@Anass-Air ~ % dotnet --version
A fatal error occurred, the folder [/usr/local/share/dotnet/host/fxr] does not contain any version-numbered child folders
anasmahdi@Anass-Air ~ % 

最佳答案

我也有这个问题,在 M1 Mac 上。因为/usr/local/share/dotnet/在我的$PATH里面(还是不知道为什么),是看错了dotnet可执行:
enter image description here
运行后

sudo ln -s /usr/local/share/dotnet/x64/dotnet /usr/local/bin/
如所述here并重新启动终端,问题就消失了。

关于.net - dotnet --version 给出 "the folder [/usr/local/share/dotnet/host/fxr] does not contain any version-numbered child folders",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71151618/

相关文章:

security - TLS 1.2 支持 SHA 1 证书

java - IBM 队列管理器连接失败并出现以下错误

powershell - 忽略自签名证书

.net - 在鼠标悬停时更改周围边框的样式

c# - 此商家已禁用 DPRP。 Paypal 错误

c# - HtmlWindow.Error 事件不会因 Javascript 错误而触发

java - JTree 实现

c# - 您如何在其实例中定义类中的方法?

c - 如何使用 cmake 和 find_package 在 macOS 上链接到 FreeGlut 而不是 Glut?

objective-c - 如何更改 NSCarbonWindow 可见性?