尝试在 Fedora 21 中安装 rpm 包,但依赖 OpenJDK 7 导致错误

尝试在 Fedora 21 中安装 rpm 包,但依赖 OpenJDK 7 导致错误

我正在运行 Fedora 21 32 位工作站版本。

尝试安装 iris-4.22.0-1.noarch.rpm:

[itse@localhost Downloads]$ sudo yum install iris-4.22.0-1.noarch.rpm
[sudo] password for itse: 
Loaded plugins: langpacks
Examining iris-4.22.0-1.noarch.rpm: iris-4.22.0-1.noarch
Marking iris-4.22.0-1.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package iris.noarch 0:4.22.0-1 will be installed
--> Processing Dependency: java-1.7.0-openjdk for package: iris-4.22.0-1.noarch
--> Processing Dependency: postgresql-jdbc for package: iris-4.22.0-1.noarch
--> Processing Dependency: postgresql-server for package: iris-4.22.0-1.noarch
--> Running transaction check
---> Package iris.noarch 0:4.22.0-1 will be installed
--> Processing Dependency: java-1.7.0-openjdk for package: iris-4.22.0-1.noarch
---> Package postgresql-jdbc.noarch 0:9.3.1102-1.fc21 will be installed
---> Package postgresql-server.i686 0:9.3.5-5.fc21 will be installed
--> Processing Dependency: postgresql-libs(x86-32) = 9.3.5-5.fc21 for package: postgresql-server-9.3.5-5.fc21.i686
--> Processing Dependency: postgresql(x86-32) = 9.3.5-5.fc21 for package: postgresql-server-9.3.5-5.fc21.i686
--> Processing Dependency: libpq.so.5 for package: postgresql-server-9.3.5-5.fc21.i686
--> Running transaction check
---> Package iris.noarch 0:4.22.0-1 will be installed
--> Processing Dependency: java-1.7.0-openjdk for package: iris-4.22.0-1.noarch
---> Package postgresql.i686 0:9.3.5-5.fc21 will be installed
---> Package postgresql-libs.i686 0:9.3.5-5.fc21 will be installed
--> Finished Dependency Resolution
Error: Package: iris-4.22.0-1.noarch (/iris-4.22.0-1.noarch)
           Requires: java-1.7.0-openjdk
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

该错误指出对 java-1.7.0-openjdk 的依赖,但据我了解 Fedora 21 使用 java-1.8.0-openjdk。

我该如何克服这种依赖性?据我了解,依赖于 OpenJDK 7 的软件包应该也可以在 OpenJDK 8 上运行。

我尝试手动安装从此链接下载的 OpenJDK7 rpm:http://rpmfind.net//linux/RPM/fedora/updates/20/i386/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i686.html

安装失败并出现以下错误:

[itse@localhost Downloads]$ sudo yum install java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i686.rpm
[sudo] password for itse: 
Loaded plugins: langpacks
Examining java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i686.rpm: 1:java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i686
Marking java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i686.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package java-1.7.0-openjdk.i686 1:1.7.0.75-2.5.4.2.fc20 will be installed
--> Processing Dependency: java-1.7.0-openjdk-headless = 1:1.7.0.75-2.5.4.2.fc20 for package: 1:java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i686
--> Processing Dependency: xorg-x11-fonts-Type1 for package: 1:java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i686
--> Running transaction check
---> Package java-1.7.0-openjdk.i686 1:1.7.0.75-2.5.4.2.fc20 will be installed
--> Processing Dependency: java-1.7.0-openjdk-headless = 1:1.7.0.75-2.5.4.2.fc20 for package: 1:java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i686
---> Package xorg-x11-fonts-Type1.noarch 0:7.5-14.fc21 will be installed
--> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.5-14.fc21.noarch
--> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.5-14.fc21.noarch
--> Running transaction check
---> Package java-1.7.0-openjdk.i686 1:1.7.0.75-2.5.4.2.fc20 will be installed
--> Processing Dependency: java-1.7.0-openjdk-headless = 1:1.7.0.75-2.5.4.2.fc20 for package: 1:java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i686
---> Package ttmkfdir.i686 0:3.0.9-44.fc21 will be installed
--> Finished Dependency Resolution
Error: Package: 1:java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i686 (/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.i686)
           Requires: java-1.7.0-openjdk-headless = 1:1.7.0.75-2.5.4.2.fc20
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我可以只安装 OpenJDK 8 并以某种方式删除对 OpenJDK 7 的依赖吗,因为 8 向后兼容 7?

答案1

弄清楚了。

安装 OpenJDK 8 而不是 7,因为版本 8 向后兼容 7。分别安装了两个列出的规范:postgresql-jdbc 和 postgresql-server 安装使用:rpm -i --nodeps iris-4.22.0-1.noarch.rpm

相关内容