当前位置:   article > 正文

.netcore入门5:linux上安装.net core sdk 3.1.101(离线安装和yum仓库安装)_yum 安装net core sdk

yum 安装net core sdk

实验环境:
操作系统:最小化安装的centos7.6 x64
sdk:dotnet-sdk-3.1.101-linux-x64.tar.gz
说明:
linux上安装dotnetcore sdk有两种方式,一个是使用编译好的离线安装包,一个是使用微软提供的yum仓库。

一、使用离线sdk安装包安装sdk

1.1 下载 dotnet-sdk

访问官网:https://dotnet.microsoft.com/download/dotnet-core/3.1
在这里插入图片描述
直接点击上面的x64就可以下载,下载后的文件是:
在这里插入图片描述

1.2 安装依赖

查看官网的依赖说明:
在这里插入图片描述
输入命令:yum install lttng-ust libcurl openssl-libs krb5-libs libicu zlib -y

[root@localhost ~]# yum install lttng-ust libcurl openssl-libs krb5-libs libicu zlib -y
已加载插件:fastestmirror
Determining fastest mirrors
 * base: ftp.sjtu.edu.cn
 * extras: ftp.sjtu.edu.cn
 * updates: ftp.sjtu.edu.cn
base                                                                                                          | 3.6 kB  00:00:00     
extras                                                                                                        | 2.9 kB  00:00:00     
updates                                                                                                       | 2.9 kB  00:00:00     
(1/4): base/7/x86_64/group_gz                                                                                 | 165 kB  00:00:01     
(2/4): extras/7/x86_64/primary_db                                                                             | 159 kB  00:00:02     
(3/4): base/7/x86_64/primary_db                                                                               | 6.0 MB  00:00:09     
(4/4): updates/7/x86_64/primary_db                                                                            | 6.7 MB  00:00:09     
没有可用软件包 lttng-ust。
软件包 zlib-1.2.7-18.el7.x86_64 已安装并且是最新版本
正在解决依赖关系
--> 正在检查事务
---> 软件包 krb5-libs.x86_64.0.1.15.1-34.el7 将被 升级
---> 软件包 krb5-libs.x86_64.0.1.15.1-37.el7_7.2 将被 更新
---> 软件包 libcurl.x86_64.0.7.29.0-51.el7 将被 升级
--> 正在处理依赖关系 libcurl = 7.29.0-51.el7,它被软件包 curl-7.29.0-51.el7.x86_64 需要
---> 软件包 libcurl.x86_64.0.7.29.0-54.el7_7.2 将被 更新
--> 正在处理依赖关系 libssh2(x86-64) >= 1.8.0,它被软件包 libcurl-7.29.0-54.el7_7.2.x86_64 需要
---> 软件包 libicu.x86_64.0.50.2-3.el7 将被 安装
---> 软件包 openssl-libs.x86_64.1.1.0.2k-16.el7 将被 升级
--> 正在处理依赖关系 openssl-libs(x86-64) = 1:1.0.2k-16.el7,它被软件包 1:openssl-1.0.2k-16.el7.x86_64 需要
---> 软件包 openssl-libs.x86_64.1.1.0.2k-19.el7 将被 更新
--> 正在检查事务
---> 软件包 curl.x86_64.0.7.29.0-51.el7 将被 升级
---> 软件包 curl.x86_64.0.7.29.0-54.el7_7.2 将被 更新
---> 软件包 libssh2.x86_64.0.1.4.3-12.el7 将被 升级
---> 软件包 libssh2.x86_64.0.1.8.0-3.el7 将被 更新
---> 软件包 openssl.x86_64.1.1.0.2k-16.el7 将被 升级
---> 软件包 openssl.x86_64.1.1.0.2k-19.el7 将被 更新
--> 解决依赖关系完成

依赖关系解决

=====================================================================================================================================
 Package                          架构                       版本                                  源                           大小
=====================================================================================================================================
正在安装:
 libicu                           x86_64                     50.2-3.el7                            base                        6.9 M
正在更新:
 krb5-libs                        x86_64                     1.15.1-37.el7_7.2                     updates                     805 k
 libcurl                          x86_64                     7.29.0-54.el7_7.2                     updates                     223 k
 openssl-libs                     x86_64                     1:1.0.2k-19.el7                       base                        1.2 M
为依赖而更新:
 curl                             x86_64                     7.29.0-54.el7_7.2                     updates                     270 k
 libssh2                          x86_64                     1.8.0-3.el7                           base                         88 k
 openssl                          x86_64                     1:1.0.2k-19.el7                       base                        493 k

事务概要
=====================================================================================================================================
安装  1 软件包
升级  3 软件包 (+3 依赖软件包)

总下载量:9.9 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
警告:/var/cache/yum/x86_64/7/updates/packages/curl-7.29.0-54.el7_7.2.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY 
curl-7.29.0-54.el7_7.2.x86_64.rpm 的公钥尚未安装
(1/7): curl-7.29.0-54.el7_7.2.x86_64.rpm                                                                      | 270 kB  00:00:00     
(2/7): libcurl-7.29.0-54.el7_7.2.x86_64.rpm                                                                   | 223 kB  00:00:00     
libssh2-1.8.0-3.el7.x86_64.rpm 的公钥尚未安装
(3/7): libssh2-1.8.0-3.el7.x86_64.rpm                                                                         |  88 kB  00:00:00     
(4/7): krb5-libs-1.15.1-37.el7_7.2.x86_64.rpm                                                                 | 805 kB  00:00:00     
(5/7): openssl-libs-1.0.2k-19.el7.x86_64.rpm                                                                  | 1.2 MB  00:00:01     
(6/7): openssl-1.0.2k-19.el7.x86_64.rpm                                                                       | 493 kB  00:00:01     
(7/7): libicu-50.2-3.el7.x86_64.rpm                                                                           | 6.9 MB  00:00:04     
-------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                 2.1 MB/s | 9.9 MB  00:00:04     
从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 检索密钥
导入 GPG key 0xF4A80EB5:
 用户ID     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 指纹       : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 软件包     : centos-release-7-6.1810.2.el7.centos.x86_64 (@anaconda)
 来自       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在更新    : 1:openssl-libs-1.0.2k-19.el7.x86_64                                                                             1/13 
  正在更新    : krb5-libs-1.15.1-37.el7_7.2.x86_64                                                                              2/13 
  正在更新    : libssh2-1.8.0-3.el7.x86_64                                                                                      3/13 
  正在更新    : libcurl-7.29.0-54.el7_7.2.x86_64                                                                                4/13 
  正在更新    : curl-7.29.0-54.el7_7.2.x86_64                                                                                   5/13 
  正在更新    : 1:openssl-1.0.2k-19.el7.x86_64                                                                                  6/13 
  正在安装    : libicu-50.2-3.el7.x86_64                                                                                        7/13 
  清理        : 1:openssl-1.0.2k-16.el7.x86_64                                                                                  8/13 
  清理        : curl-7.29.0-51.el7.x86_64                                                                                       9/13 
  清理        : libcurl-7.29.0-51.el7.x86_64                                                                                   10/13 
  清理        : libssh2-1.4.3-12.el7.x86_64                                                                                    11/13 
  清理        : 1:openssl-libs-1.0.2k-16.el7.x86_64                                                                            12/13 
  清理        : krb5-libs-1.15.1-34.el7.x86_64                                                                                 13/13 
  验证中      : krb5-libs-1.15.1-37.el7_7.2.x86_64                                                                              1/13 
  验证中      : curl-7.29.0-54.el7_7.2.x86_64                                                                                   2/13 
  验证中      : libicu-50.2-3.el7.x86_64                                                                                        3/13 
  验证中      : 1:openssl-1.0.2k-19.el7.x86_64                                                                                  4/13 
  验证中      : libcurl-7.29.0-54.el7_7.2.x86_64                                                                                5/13 
  验证中      : 1:openssl-libs-1.0.2k-19.el7.x86_64                                                                             6/13 
  验证中      : libssh2-1.8.0-3.el7.x86_64                                                                                      7/13 
  验证中      : 1:openssl-libs-1.0.2k-16.el7.x86_64                                                                             8/13 
  验证中      : krb5-libs-1.15.1-34.el7.x86_64                                                                                  9/13 
  验证中      : curl-7.29.0-51.el7.x86_64                                                                                      10/13 
  验证中      : libssh2-1.4.3-12.el7.x86_64                                                                                    11/13 
  验证中      : 1:openssl-1.0.2k-16.el7.x86_64                                                                                 12/13 
  验证中      : libcurl-7.29.0-51.el7.x86_64                                                                                   13/13 

已安装:
  libicu.x86_64 0:50.2-3.el7                                                                                                         

更新完毕:
  krb5-libs.x86_64 0:1.15.1-37.el7_7.2         libcurl.x86_64 0:7.29.0-54.el7_7.2         openssl-libs.x86_64 1:1.0.2k-19.el7        

作为依赖被升级:
  curl.x86_64 0:7.29.0-54.el7_7.2              libssh2.x86_64 0:1.8.0-3.el7              openssl.x86_64 1:1.0.2k-19.el7             

完毕!
[root@localhost ~]#
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120

注意:上面提示【没有可用软件包 lttng-ust。】,本次试验发现不受影响,先忽略。

1.3 上传sdk包并解压到/usr/local/dotnet目录

1). 使用winscp上传dotnet-sdk-3.1.101-linux-x64.tar.gz/usr/local目录

2). 创建/usr/local/dotnet目录并将sdk包解压到这个目录中:

[root@localhost local]# pwd
/usr/local
[root@localhost local]# ll
总用量 110384
drwxr-xr-x. 2 root root         6 4月  11 2018 bin
-rw-r--r--. 1 root root 113032845 2月  15 13:51 dotnet-sdk-3.1.101-linux-x64.tar.gz
drwxr-xr-x. 2 root root         6 4月  11 2018 etc
drwxr-xr-x. 2 root root         6 4月  11 2018 games
drwxr-xr-x. 2 root root         6 4月  11 2018 include
drwxr-xr-x. 2 root root         6 4月  11 2018 lib
drwxr-xr-x. 2 root root         6 4月  11 2018 lib64
drwxr-xr-x. 2 root root         6 4月  11 2018 libexec
drwxr-xr-x. 2 root root         6 4月  11 2018 sbin
drwxr-xr-x. 5 root root        49 2月  15 08:57 share
drwxr-xr-x. 2 root root         6 4月  11 2018 src
[root@localhost local]# mkdir dotnet
[root@localhost local]# tar -zxf dotnet-sdk-3.1.101-linux-x64.tar.gz -C dotnet
[root@localhost local]# cd dotnet
[root@localhost dotnet]# ll
总用量 108
-rwxr-xr-x. 1 1001 117 73016 12月  9 11:12 dotnet
drwxr-xr-x. 3 1001 117    17 12月  9 11:14 host
-rw-r--r--. 1 1001 117  1116 12月  9 11:08 LICENSE.txt
drwxr-xr-x. 6 1001 117   150 12月 20 06:00 packs
drwxr-xr-x. 3 1001 117    21 12月 20 06:00 sdk
drwxr-xr-x. 4 1001 117    67 12月 16 09:56 shared
drwxr-xr-x. 3 1001 117    19 12月 20 06:00 templates
-rw-r--r--. 1 1001 117 31330 12月  9 11:08 ThirdPartyNotices.txt
[root@localhost dotnet]# 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29

1.4 配置环境变量

/etc/profile文件末尾加上两行:

export DOTNET_ROOT=/usr/local/dotnet
export PATH=$DOTNET_ROOT:$PATH
  • 1
  • 2

执行 source /etc/profile使改动生效:

[root@localhost dotnet]# source /etc/profile
  • 1

1.5 验证dotnetcore环境:dotnet --versiondotnet --info

在这里插入图片描述

二、使用yum仓库安装

查看官方文档:https://docs.microsoft.com/zh-cn/dotnet/core/install/linux-package-manager-centos7
在这里插入图片描述
按照上面的步骤:

2.1 添加微软仓库:sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm

在这里插入图片描述

2.2 安装dotnet:sudo yum install dotnet-sdk-3.1

[root@localhost ~]# sudo yum install dotnet-sdk-3.1
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.huaweicloud.com
 * extras: mirrors.huaweicloud.com
 * updates: mirrors.nju.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 dotnet-sdk-3.1.x86_64.0.3.1.101-1 将被 安装
--> 正在处理依赖关系 netstandard-targeting-pack-2.1 >= 2.1.0,它被软件包 dotnet-sdk-3.1-3.1.101-1.x86_64 需要
--> 正在处理依赖关系 aspnetcore-runtime-3.1,它被软件包 dotnet-sdk-3.1-3.1.101-1.x86_64 需要
--> 正在处理依赖关系 aspnetcore-targeting-pack-3.1,它被软件包 dotnet-sdk-3.1-3.1.101-1.x86_64 需要
--> 正在处理依赖关系 dotnet-runtime-3.1,它被软件包 dotnet-sdk-3.1-3.1.101-1.x86_64 需要
--> 正在处理依赖关系 dotnet-apphost-pack-3.1,它被软件包 dotnet-sdk-3.1-3.1.101-1.x86_64 需要
--> 正在处理依赖关系 dotnet-targeting-pack-3.1,它被软件包 dotnet-sdk-3.1-3.1.101-1.x86_64 需要
--> 正在检查事务
---> 软件包 aspnetcore-runtime-3.1.x86_64.0.3.1.1-1 将被 安装
---> 软件包 aspnetcore-targeting-pack-3.1.x86_64.0.3.1.0-1 将被 安装
---> 软件包 dotnet-apphost-pack-3.1.x86_64.0.3.1.1-1 将被 安装
---> 软件包 dotnet-runtime-3.1.x86_64.0.3.1.1-1 将被 安装
--> 正在处理依赖关系 dotnet-hostfxr-3.1 >= 3.1.1,它被软件包 dotnet-runtime-3.1-3.1.1-1.x86_64 需要
--> 正在处理依赖关系 dotnet-runtime-deps-3.1 >= 3.1.1,它被软件包 dotnet-runtime-3.1-3.1.1-1.x86_64 需要
---> 软件包 dotnet-targeting-pack-3.1.x86_64.0.3.1.0-1 将被 安装
---> 软件包 netstandard-targeting-pack-2.1.x86_64.0.2.1.0-1 将被 安装
--> 正在检查事务
---> 软件包 dotnet-hostfxr-3.1.x86_64.0.3.1.1-1 将被 安装
--> 正在处理依赖关系 dotnet-host >= 3.1.1,它被软件包 dotnet-hostfxr-3.1-3.1.1-1.x86_64 需要
---> 软件包 dotnet-runtime-deps-3.1.x86_64.0.3.1.1-1 将被 安装
--> 正在处理依赖关系 libicu,它被软件包 dotnet-runtime-deps-3.1-3.1.1-1.x86_64 需要
--> 正在检查事务
---> 软件包 dotnet-host.x86_64.0.3.1.1-1 将被 安装
---> 软件包 libicu.x86_64.0.50.2-3.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

=====================================================================================================================================
 Package                                    架构               版本                    源                                       大小
=====================================================================================================================================
正在安装:
 dotnet-sdk-3.1                             x86_64             3.1.101-1               packages-microsoft-com-prod              63 M
为依赖而安装:
 aspnetcore-runtime-3.1                     x86_64             3.1.1-1                 packages-microsoft-com-prod             7.5 M
 aspnetcore-targeting-pack-3.1              x86_64             3.1.0-1                 packages-microsoft-com-prod             1.4 M
 dotnet-apphost-pack-3.1                    x86_64             3.1.1-1                 packages-microsoft-com-prod              67 k
 dotnet-host                                x86_64             3.1.1-1                 packages-microsoft-com-prod              39 k
 dotnet-hostfxr-3.1                         x86_64             3.1.1-1                 packages-microsoft-com-prod             148 k
 dotnet-runtime-3.1                         x86_64             3.1.1-1                 packages-microsoft-com-prod              29 M
 dotnet-runtime-deps-3.1                    x86_64             3.1.1-1                 packages-microsoft-com-prod             2.8 k
 dotnet-targeting-pack-3.1                  x86_64             3.1.0-1                 packages-microsoft-com-prod             3.4 M
 libicu                                     x86_64             50.2-3.el7              base                                    6.9 M
 netstandard-targeting-pack-2.1             x86_64             2.1.0-1                 packages-microsoft-com-prod             2.1 M

事务概要
=====================================================================================================================================
安装  1 软件包 (+10 依赖软件包)

总计:114 M
总下载量:92 M
安装大小:131 M
Is this ok [y/d/N]: y
Downloading packages:
警告:/var/cache/yum/x86_64/7/packages-microsoft-com-prod/packages/dotnet-runtime-3.1.1-x64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID be1229cf: NOKEY
dotnet-runtime-3.1.1-x64.rpm 的公钥尚未安装
(1/2): dotnet-runtime-3.1.1-x64.rpm                                                                           |  29 MB  00:03:53     
dotnet-sdk-3.1.101-x64.rpm     FAILED                                          =-                 ]  3.6 B/s |  53 MB 3153:01:30 ETA 
https://packages.microsoft.com/centos/7/prod/dotnet-sdk-3.1.101-x64.rpm: [Errno 12] Timeout on https://packages.microsoft.com/centos/7/prod/dotnet-sdk-3.1.101-x64.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
正在尝试其它镜像。
dotnet-sdk-3.1.101-x64.rpm     FAILED                                          =======            ]  5.9 B/s |  66 MB 1309:07:37 ETA 
https://packages.microsoft.com/centos/7/prod/dotnet-sdk-3.1.101-x64.rpm: [Errno 12] Timeout on https://packages.microsoft.com/centos/7/prod/dotnet-sdk-3.1.101-x64.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
正在尝试其它镜像。
dotnet-sdk-3.1.101-x64.rpm     FAILED                                          =======-           ]  4.1 B/s |  67 MB 1751:35:08 ETA 
https://packages.microsoft.com/centos/7/prod/dotnet-sdk-3.1.101-x64.rpm: [Errno 12] Timeout on https://packages.microsoft.com/centos/7/prod/dotnet-sdk-3.1.101-x64.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
正在尝试其它镜像。
dotnet-sdk-3.1.101-x64.rpm     FAILED                                          ===========        ]  1.4 B/s |  75 MB 3499:26:24 ETA 
https://packages.microsoft.com/centos/7/prod/dotnet-sdk-3.1.101-x64.rpm: [Errno 12] Timeout on https://packages.microsoft.com/centos/7/prod/dotnet-sdk-3.1.101-x64.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
正在尝试其它镜像。
dotnet-sdk-3.1.101-x64.rpm     FAILED                                          ===========        ]  3.3 B/s |  75 MB 1499:55:13 ETA 
https://packages.microsoft.com/centos/7/prod/dotnet-sdk-3.1.101-x64.rpm: [Errno 12] Timeout on https://packages.microsoft.com/centos/7/prod/dotnet-sdk-3.1.101-x64.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
正在尝试其它镜像。
dotnet-sdk-3.1.101-x64.rpm     FAILED                                          ============        ]  9.1 B/s |  76 MB 534:03:16 ETA 
https://packages.microsoft.com/centos/7/prod/dotnet-sdk-3.1.101-x64.rpm: [Errno 12] Timeout on https://packages.microsoft.com/centos/7/prod/dotnet-sdk-3.1.101-x64.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
正在尝试其它镜像。
(2/2): dotnet-sdk-3.1.101-x64.rpm                                                                             |  63 MB  00:19:06     
-------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                  29 kB/s |  92 MB  00:55:02     
警告:/var/cache/yum/x86_64/7/base/packages/libicu-50.2-3.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 检索密钥
导入 GPG key 0xF4A80EB5:
 用户ID     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 指纹       : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 软件包     : centos-release-7-6.1810.2.el7.centos.x86_64 (@anaconda)
 来自       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
是否继续?[y/N]:y
从 https://packages.microsoft.com/keys/microsoft.asc 检索密钥
导入 GPG key 0xBE1229CF:
 用户ID     : "Microsoft (Release signing) <gpgsecurity@microsoft.com>"
 指纹       : bc52 8686 b50d 79e3 39d3 721c eb3e 94ad be12 29cf
 来自       : https://packages.microsoft.com/keys/microsoft.asc
是否继续?[y/N]:y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
警告:RPM 数据库已被非 yum 程序修改。
  正在安装    : dotnet-targeting-pack-3.1-3.1.0-1.x86_64                                                                        1/11 
  正在安装    : aspnetcore-targeting-pack-3.1-3.1.0-1.x86_64                                                                    2/11 
  正在安装    : dotnet-apphost-pack-3.1-3.1.1-1.x86_64                                                                          3/11 
  正在安装    : dotnet-host-3.1.1-1.x86_64                                                                                      4/11 
  正在安装    : dotnet-hostfxr-3.1-3.1.1-1.x86_64                                                                               5/11 
  正在安装    : netstandard-targeting-pack-2.1-2.1.0-1.x86_64                                                                   6/11 
  正在安装    : libicu-50.2-3.el7.x86_64                                                                                        7/11 
  正在安装    : dotnet-runtime-deps-3.1-3.1.1-1.x86_64                                                                          8/11 
  正在安装    : dotnet-runtime-3.1-3.1.1-1.x86_64                                                                               9/11 
  正在安装    : aspnetcore-runtime-3.1-3.1.1-1.x86_64                                                                          10/11 
  正在安装    : dotnet-sdk-3.1-3.1.101-1.x86_64                                                                                11/11 
This software may collect information about you and your use of the software, and send that to Microsoft.
Please visit http://aka.ms/dotnet-cli-eula for more information.
Welcome to .NET Core!
---------------------
Learn more about .NET Core: https://aka.ms/dotnet-docs
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs

Telemetry
---------
The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

Configuring...
--------------
A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
  验证中      : libicu-50.2-3.el7.x86_64                                                                                        1/11 
  验证中      : netstandard-targeting-pack-2.1-2.1.0-1.x86_64                                                                   2/11 
  验证中      : dotnet-targeting-pack-3.1-3.1.0-1.x86_64                                                                        3/11 
  验证中      : aspnetcore-targeting-pack-3.1-3.1.0-1.x86_64                                                                    4/11 
  验证中      : dotnet-runtime-deps-3.1-3.1.1-1.x86_64                                                                          5/11 
  验证中      : dotnet-sdk-3.1-3.1.101-1.x86_64                                                                                 6/11 
  验证中      : dotnet-hostfxr-3.1-3.1.1-1.x86_64                                                                               7/11 
  验证中      : dotnet-host-3.1.1-1.x86_64                                                                                      8/11 
  验证中      : aspnetcore-runtime-3.1-3.1.1-1.x86_64                                                                           9/11 
  验证中      : dotnet-runtime-3.1-3.1.1-1.x86_64                                                                              10/11 
  验证中      : dotnet-apphost-pack-3.1-3.1.1-1.x86_64                                                                         11/11 

已安装:
  dotnet-sdk-3.1.x86_64 0:3.1.101-1                                                                                                  

作为依赖被安装:
  aspnetcore-runtime-3.1.x86_64 0:3.1.1-1                       aspnetcore-targeting-pack-3.1.x86_64 0:3.1.0-1                      
  dotnet-apphost-pack-3.1.x86_64 0:3.1.1-1                      dotnet-host.x86_64 0:3.1.1-1                                        
  dotnet-hostfxr-3.1.x86_64 0:3.1.1-1                           dotnet-runtime-3.1.x86_64 0:3.1.1-1                                 
  dotnet-runtime-deps-3.1.x86_64 0:3.1.1-1                      dotnet-targeting-pack-3.1.x86_64 0:3.1.0-1                          
  libicu.x86_64 0:50.2-3.el7                                    netstandard-targeting-pack-2.1.x86_64 0:2.1.0-1                     

完毕!
[root@localhost ~]# 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156

2.3 测试dotnet命令:dotnet --versiondotnet --info

[root@localhost ~]# dotnet --version
3.1.101
[root@localhost ~]# dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.101
 Commit:    b377529961

Runtime Environment:
 OS Name:     centos
 OS Version:  7
 OS Platform: Linux
 RID:         centos.7-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.101/

Host (useful for support):
  Version: 3.1.1
  Commit:  a1388f194c

.NET Core SDKs installed:
  3.1.101 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
[root@localhost ~]#
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28

可见安装成功!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/127319
推荐阅读
相关标签
  

闽ICP备14008679号