在Kylin3.2上安装dotnet SDK 2.1.300

1. 下载

  • ICU libraries下载地址
  • dotnet SDK 2.1.300 RHEL6专用版下载地址

2. 安装ICU libraries

用管理员权限,直接解压icu包到根目录,这包里嵌套了usr/local目录,所以解压只需指定根目录/就行

tar -xf icu4c-57_1-RHEL6-x64.tgz -C /

3. 安装dotnet SDK

解压至任意目录

tar -xf dotnet-sdk-2.1.300-rhel.6-x64.tar.gz -C /root/dotnet

4. 运行dotnet

在运行前需要指定一个环境变量,即ICU库所在的目录

export LD_LIBRARY_PATH=/usr/local/lib

这是临时有效,要想永久生效,要把此环境变量加到系统文件中。
然后,切换到dotnet所在目录运行dotnet --info,如果一切顺利会显示如下信息:

.NET Core SDK (reflecting any global.json):
 Version:   2.1.300
 Commit:    adab45bf0c

Runtime Environment:
 OS Name:     Linux
 OS Version:  
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /root/dotnet/sdk/2.1.300/

Host (useful for support):
  Version: 2.1.0
  Commit:  caa7b7e2ba

.NET Core SDKs installed:
  2.1.300 [/root/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0 [/root/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0 [/root/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.0 [/root/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

/usr/local/bin目录下创建一个软链接,以便使用:

ln -s /root/dotnet/dotnet /usr/local/bin/

参考链接

  • https://github.com/dotnet/core/blob/master/Documentation/build-and-install-rhel6-prerequisites.md
  • https://github.com/dotnet/core/blob/master/release-notes/download-archives/2.1.0-download.md

你可能感兴趣的:(在Kylin3.2上安装dotnet SDK 2.1.300)