우리는 설치하려고합니다java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64.rpm
yum localinstall java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64.rpm
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
Examining java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64.rpm: 1:java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64
Marking java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.0-openjdk-devel.x86_64 1:1.8.0.161-2.b14.el7 will be installed
--> Processing Dependency: java-1.8.0-openjdk(x86-64) = 1:1.8.0.161-2.b14.el7 for package: 1:java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64
--> Finished Dependency Resolution
Error: Package: 1:java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64 (/java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64)
Requires: java-1.8.0-openjdk(x86-64) = 1:1.8.0.161-2.b14.el7
Installed: 1:java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64 (installed)
java-1.8.0-openjdk(x86-64) = 1:1.8.0.171-8.b10.el7_5
Available: 1:java-1.8.0-openjdk-1.8.0.161-2.b14.el7.x86_64 (local)
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.161-2.b14.el7
하지만 내가 이해하지 못하는 것은 우리가 필요한 동일한 rpm을 설치하려고 한다는 것입니다!
java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64.rpm
그럼 여기서 무슨 일이 일어나고 있는 걸까요?
현재 설치된 rpm
rpm -qa | grep openjdk
java-1.8.0-openjdk-headless-1.8.0.171-8.b10.el7_5.x86_64
java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64
java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)
설치하는 유일한 방법은 yum이 아닌 rpm을 사용하는 것입니다.
rpm -Va --nofiles --nodigest java-1.7.0-openjdk-devel-1.7.0.171-2.6.13.2.el7.x86_64.rpm
답변1
java-1.8.0-openjdk-devel
그리고 java-1.8.0-openjdk
버전이 정확히 일치해야 합니다.
간단히 말해서:
yum downgrade java-1.8.0-openjdk-1.8.0.161-2.b14.el7
yum install java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64.rpm
나는 이 질문에 대한 전체 답변을 여기에 썼습니다.https://stackoverflow.com/questions/57498755/installing-python36-devel-on-rhel7-failing/57519956#57519956
답변2
당신은 그것을 고치려고 노력할 수 있습니다Yum 다운로더:
# Install yumdownloader
yum install yum-utils
# Download the missing packages
yumdownloader java-1.8.0-openjdk --resolve --destdir pkgs
# Install all at once
yum install pkgs/*.rpm