我正在从规范文件创建 RPM。我正在安装 java8 最新版本作为依赖项,它总是工作正常。今天我需要将 java8 版本固定到特定的版本,但出现错误。我在规范文件中更改的内容来自:
Requires: java-1.8.0-openjdk-devel
到
Requires: java-1.8.0-openjdk-devel = 1:1.8.0.252.b09
可以看到版本1:1.8.0.252.b09-2.el6_10
是可用的,那为什么会出现这个错误呢?
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.252.b09-2.el6_10 will be installed
--> Processing Dependency: java-1.8.0-openjdk-headless = 1:1.8.0.252.b09-2.el6_10 for package: 1:java-1.8.0-openjdk-1.8.0.252.b09-2.el6_10.x86_64
---> Package libXfont.x86_64 0:1.5.1-2.el6 will be installed
---> Package libXft.x86_64 0:2.3.2-1.el6 will be installed
---> Package libXt.x86_64 0:1.1.4-6.1.el6 will be installed
---> Package libfontenc.x86_64 0:1.1.2-3.el6 will be installed
---> Package libthai.x86_64 0:0.1.12-3.el6 will be installed
---> Package pixman.x86_64 0:0.32.8-1.el6 will be installed
--> Finished Dependency Resolution
Error: Package: 1:java-1.8.0-openjdk-1.8.0.252.b09-2.el6_10.x86_64 (centos_updates)
Requires: java-1.8.0-openjdk-headless = 1:1.8.0.252.b09-2.el6_10
Available: 1:java-1.8.0-openjdk-headless-1.8.0.171-8.b10.el6_9.x86_64 (centos_base)
java-1.8.0-openjdk-headless = 1:1.8.0.171-8.b10.el6_9
Available: 1:java-1.8.0-openjdk-headless-1.8.0.181-3.b13.el6_10.x86_64 (centos_updates)
java-1.8.0-openjdk-headless = 1:1.8.0.181-3.b13.el6_10
Available: 1:java-1.8.0-openjdk-headless-1.8.0.191.b12-0.el6_10.x86_64 (centos_updates)
java-1.8.0-openjdk-headless = 1:1.8.0.191.b12-0.el6_10
Available: 1:java-1.8.0-openjdk-headless-1.8.0.201.b09-1.el6_10.x86_64 (centos_updates)
java-1.8.0-openjdk-headless = 1:1.8.0.201.b09-1.el6_10
Available: 1:java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el6_10.x86_64 (centos_updates)
java-1.8.0-openjdk-headless = 1:1.8.0.201.b09-2.el6_10
Available: 1:java-1.8.0-openjdk-headless-1.8.0.212.b04-0.el6_10.x86_64 (centos_updates)
java-1.8.0-openjdk-headless = 1:1.8.0.212.b04-0.el6_10
Available: 1:java-1.8.0-openjdk-headless-1.8.0.222.b10-0.el6_10.x86_64 (centos_updates)
java-1.8.0-openjdk-headless = 1:1.8.0.222.b10-0.el6_10
Available: 1:java-1.8.0-openjdk-headless-1.8.0.232.b09-1.el6_10.x86_64 (centos_updates)
java-1.8.0-openjdk-headless = 1:1.8.0.232.b09-1.el6_10
Available: 1:java-1.8.0-openjdk-headless-1.8.0.242.b07-1.el6_10.x86_64 (centos_updates)
java-1.8.0-openjdk-headless = 1:1.8.0.242.b07-1.el6_10
Available: 1:java-1.8.0-openjdk-headless-1.8.0.252.b09-2.el6_10.x86_64 (centos_updates)
java-1.8.0-openjdk-headless = 1:1.8.0.252.b09-2.el6_10
Available: 1:java-1.8.0-openjdk-headless-1.8.0.262.b10-0.el6_10.x86_64 (centos_updates)
java-1.8.0-openjdk-headless = 1:1.8.0.262.b10-0.el6_10
Installing: 1:java-1.8.0-openjdk-headless-1.8.0.265.b01-0.el6_10.x86_64 (centos_updates)
java-1.8.0-openjdk-headless = 1:1.8.0.265.b01-0.el6_10
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest