Linux安装.net core
1.添加yum源
rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
2.升级所有包同时也升级软件和系统内核
yum update
3.安装.net core
yum install dotnet-sdk-2.1.4
安装完之后输入:
dotnet --version
不好,提示如下错误:
Failed to load , error: libunwind.so.8: cannot open shared object file: No such file or directory
Failed to bind to CoreCLR at ‘/root/dotnet/shared/Microsoft.NETCore.App/2.0.0/libcoreclr.so‘
不怕,因为我们没有安装libunwind,只要安装下即可,执行以下命令:
yum install libunwind
再次执行:dotnet --version,又报错了
FailFast: Couldn‘t find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
然后我们安装ICU
yum install icu
最后执行:dotnet --version
另外给一个很好用的命令可以查看支持哪些项目类型:dotnet new --help