我已经在Mac上安装了dot net core,但是没有找到"dotnet".命令 [英] I've installed dot net core on mac, but didn't find "dotnet" command
问题描述
今天,我刚刚下载并安装了"dotnet-dev-osx-x64.1.0.0-preview1-002702.pkg".之后,我在终端中尝试了"dotnet"命令,但未打印任何内容.
Today I've just downloaded "dotnet-dev-osx-x64.1.0.0-preview1-002702.pkg" and installed it. After that I tried "dotnet" command in my terminal, nothing printed.
我也尝试了Spotlight搜索,似乎什么也没找到.
I also tried Spotlight searching, seems nothing found.
此软件包在哪里安装?
推荐答案
关键是您需要找到文件dotnet.exe,然后创建一个新的Symbolic链接以创建指向该dotnet.exe文件的新快捷链接. usr/local/bin文件夹.有时您会看到此错误"/usr/local/bin//dotnet:文件已存在",这意味着该链接已存在于该文件夹中(通常是错误的链接),以修复需要转到该文件夹并删除的问题.链接.
The key thing is you need to locate the file dotnet.exe, then create a new Symbolic link to create a new shortcut link to that dotnet.exe file in the usr/local/bin folder. Sometimes you see this error "/usr/local/bin//dotnet: File exists", it means the link already exists in that folder (and it's normally a faulty one), to fix that you need to go to that folder and delete the link.
找到dotnet.exe文件后,在我的情况下,该文件位于'/usr/local/share/dotnet/dotnet'文件夹中.使用以下命令为其创建新的符号链接:
After you have located the dotnet.exe file, in my case it's in the '/usr/local/share/dotnet/dotnet' folder. Create a new symbolic link for it using this command:
ln -s/usr/local/share/dotnet/dotnet/usr/local/bin/
ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/
完成!您现在可以运行"dotnet"命令...希望有帮助
Done! You can run the "dotnet" command now...Hope it helps
这篇关于我已经在Mac上安装了dot net core,但是没有找到"dotnet".命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!