通过 yum 进行 java 开发安装

通过 yum 进行 java 开发安装

我们正在安装 rpm -java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64.rpm

yum  localinstall java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64.rpm
Loaded plugins: langpacks
Examining java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64.rpm: 1:java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64
Marking java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.0-openjdk-devel.x86_64 1:1.8.0.171-8.b10.el7_5 will be installed
--> Processing Dependency: java-1.8.0-openjdk(x86-64) = 1:1.8.0.171-8.b10.el7_5 for package: 1:java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64
HighAvailability                                                                                                                                                      | 4.3 kB  00:00:00
ResilientStorage                                                                                                                                                      | 4.3 kB  00:00:00
local                                                                                                                                                                 | 4.3 kB  00:00:00
--> Finished Dependency Resolution
Error: Package: 1:java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64 (/java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64)
           Requires: java-1.8.0-openjdk(x86-64) = 1:1.8.0.171-8.b10.el7_5
           Installed: 1:java-1.8.0-openjdk-1.8.0.161-2.b14.el7.x86_64 (@anaconda/7.5)
               java-1.8.0-openjdk(x86-64) = 1:1.8.0.161-2.b14.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我们可以看到

Requires: java-1.8.0-openjdk(x86-64) = 1:1.8.0.171-8.b10.el7_5

但我们要安装的是 - java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64.rpm

那么问题出在哪里呢?

答案1

尝试使用:

--skip-broken 

或者

rpm -Va --nofiles --nodigest

相关内容