下载.net core sdk
https://www.microsoft.com/net/core#macos
$ dotnet
-bash: dotnet: command not found
已安装成功,肯定是环境变量设置问题。
$ cd /usr/local/share/dotnet
$ ls
LICENSE.txt dotnet packs shared
ThirdPartyNotices.txt host sdk templates
查看~/.bash_profile环境设置
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
// 设置软链接
$ ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/
// 查看dotnet位置
$ which dotnet
/usr/local/bin/dotnet
版权声明:本文为qq_41240287原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。