如何在redhat linux

时间:2018-06-12 09:56:49

标签: linux yum rhel

我试图在Redhat上安装特定版本的netcore,但使用哪种策略并不重要我能获得最新版本的软件包。

例如,如果我跑:

yumdownloader - 解析rh-dotnet20-dotnet-0: 2.0.0-4 .el7.x86_64 --nogpgcheck

将下载:

(1/11):rh-dotnet20-dotnet-2.0.0-4.el7.x86_64.rpm | 4.3 kB 00:00:00
(2/11):libunwind-1.2-2.el7.x86_64.rpm | 57 kB 00:00:00
(3/11):rh-dotnet20-dotnet-host-2.0.6-1.el7.x86_64.rpm | 172 kB 00:00:00
(4/11):libicu-50.1.2-15.el7.x86_64.rpm | 6.9 MB 00:00:00
(5/11):rh-dotnet20-dotnet-runtime-2.0-2.0.6-1.el7.x86_64.rpm | 20 MB 00:00:01
(6/11):rh-dotnet20-libcurl-7.47.1-1.3.el7.x86_64.rpm | 248 kB 00:00:00
(7/11):rh-dotnet20-lttng-ust-2.8.1-3.el7.x86_64.rpm | 233 kB 00:00:00
(8/11):rh-dotnet20-runtime-2.0-6.el7.x86_64.rpm | 1.1 MB 00:00:00
(9/11):rh-dotnet20-userspace-rcu-0.9.2-3.el7.x86_64.rpm | 89 kB 00:00:00
(10/11):scl-utils-20130529-18.el7_4.x86_64.rpm | 24 kB 00:00:00
(11/11):rh-dotnet20-dotnet-sdk-2.0-2.0.3-4.el7.x86_64.rpm | 34 MB 00:00:03

如果我跑的话也是如此:

yumdownloader - 解析rh-dotnet20-dotnet-0: 2.0.6-1 .el7.x86_64 --nogpgcheck

(1/11):rh-dotnet20-dotnet-2.0.6-1.el7.x86_64.rpm | 5.1 kB 00:00:00
(2/11):rh-dotnet20-dotnet-host-2.0.6-1.el7.x86_64.rpm | 172 kB 00:00:00
(3/11):libunwind-1.2-2.el7.x86_64.rpm | 57 kB 00:00:00
(4/11):libicu-50.1.2-15.el7.x86_64.rpm | 6.9 MB 00:00:01
(5/11):rh-dotnet20-dotnet-runtime-2.0-2.0.6-1.el7.x86_64.rpm | 20 MB 00:00:01
(6/11):rh-dotnet20-libcurl-7.47.1-1.3.el7.x86_64.rpm | 248 kB 00:00:00
(7/11):rh-dotnet20-lttng-ust-2.8.1-3.el7.x86_64.rpm | 233 kB 00:00:00
(8/11):rh-dotnet20-runtime-2.0-6.el7.x86_64.rpm | 1.1 MB 00:00:00
(9/11):rh-dotnet20-userspace-rcu-0.9.2-3.el7.x86_64.rpm | 89 kB 00:00:00
(10/11):rh-dotnet20-dotnet-sdk-2.0-2.0.3-4.el7.x86_64.rpm | 34 MB 00:00:01
(11/11):scl-utils-20130529-18.el7_4.x86_64.rpm | 24 kB 00:00:00

有没有办法强制YUM安装我需要的特定版本?谢谢!

1 个答案:

答案 0 :(得分:0)

这两个命令的效果不同。一个赞扬下载rh-dotnet20-dotnet-2.0.0-4.el7.x86_64.rpm,另一个下载rh-dotnet20-dotnet-2.0.6-1.el7.x86_64

但是,指定的版本不会扩展到自动安装的依赖项。因此,如果您希望版本rh-dotnet20-dotnet-host中有2.0.0-4.el7,则还需要明确指定该版本。