gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 22:41:43 35 4
gpt4 key购买 nike

当我运行 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/

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