下载.net core sdkhttps://www.microsoft.com/net/core#macos
$ dotnet-bash: dotnet: command not found
已安装成功,肯定是环境变量设置问题。
$ cd /usr/local/share/dotnet$ lsLICENSE.txt dotnet packs sharedThirdPartyNotices.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
参考:
https://blog.csdn.net/lscan/article/details/74279314