1.添加yum源

rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm

 Linux安装.net core

2.升级所有包同时也升级软件和系统内核

yum update

 Linux安装.net core

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

Linux安装.net core

 

另外给一个很好用的命令可以查看支持哪些项目类型:dotnet new --help

Linux安装.net core

相关文章:

  • 2022-12-23
  • 2021-08-08
  • 2021-11-09
  • 2021-06-01
  • 2021-11-07
  • 2021-12-25
  • 2021-08-03
  • 2021-07-08
猜你喜欢
  • 2022-12-23
  • 2021-06-23
  • 2021-08-06
  • 2021-12-19
相关资源
相似解决方案