0

i seem to have hit a wall trying to install openjdk-1.8.0 (& -devel) on CentOS -7 and yum isn't able to find the package (No package java-1.8.0-openjdk available.)

http://mirror.centos.org/centos/7/updates/x86_64/Packages/ not even from here.

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.tripadvisor.com
 * epel: s3-mirror-us-east-1.fedoraproject.org
 * extras: mirror.vtti.vt.edu
No package java-1.8.0-openjdk available.
Error: Nothing to do

CentOS-Base.repo:

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

more specifically on centos-release-7-4.1708.el7.centos.x86_64

closed as off-topic by Ward, womble Oct 4 '17 at 4:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1

i figured

bash$ grep openjdk /etc/yum.conf
exclude=*.i?86 *openjdk* java*

and can't believe spent a long time at everything else. works now after removing the exclusion. very naive!

0
yum search jdk

Results:

java-1.8.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment

So you could likely run:

yum install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64

If that doesn't work, try a yum clean all and repeat.


Edit: You could also search the FTP repo link you posted...

enter image description here

  • thanks! i figured it was excluded in /etc/yum.conf. it definitely was totally trivial i completely overlooked – shwetank Sep 28 '17 at 4:41
0

per following output, java-1.8.0-openjdk appears to be in updates

$ cat /etc/redhat-release 
CentOS Linux release 7.4.1708 (Core) 
$ yum list java-1.8.0-openjdk*
Loaded plugins: fastestmirror, langpacks, nvidia
Loading mirror speeds from cached hostfile
 * base: mirrors.tripadvisor.com
 * elrepo: repos.ord.lax-noc.com
 * epel: mirror.math.princeton.edu
 * extras: mirrors.greenmountainaccess.net
 * nux-dextop: mirror.li.nux.ro
 * updates: mirror.net.cen.ct.gov
Installed Packages
java-1.8.0-openjdk.x86_64                                                                                       1:1.8.0.144-0.b01.el7_4                                                                    @updates
java-1.8.0-openjdk-headless.x86_64                                                                              1:1.8.0.144-0.b01.el7_4                                                                    @updates
Available Packages
java-1.8.0-openjdk.i686                                                                                         1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-accessibility.i686                                                                           1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-accessibility.x86_64                                                                         1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-accessibility-debug.i686                                                                     1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-accessibility-debug.x86_64                                                                   1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-debug.i686                                                                                   1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-debug.x86_64                                                                                 1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-demo.i686                                                                                    1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-demo.x86_64                                                                                  1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-demo-debug.i686                                                                              1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-demo-debug.x86_64                                                                            1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-devel.i686                                                                                   1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-devel.x86_64                                                                                 1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-devel-debug.i686                                                                             1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-devel-debug.x86_64                                                                           1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-headless.i686                                                                                1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-headless-debug.i686                                                                          1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-headless-debug.x86_64                                                                        1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-javadoc.noarch                                                                               1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-javadoc-debug.noarch                                                                         1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-javadoc-zip.noarch                                                                           1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-javadoc-zip-debug.noarch                                                                     1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-src.i686                                                                                     1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-src.x86_64                                                                                   1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-src-debug.i686                                                                               1:1.8.0.144-0.b01.el7_4                                                                    updates 
java-1.8.0-openjdk-src-debug.x86_64                                                                             1:1.8.0.144-0.b01.el7_4                                                                    updates 
$ 

you should run yum clean all and/or yum check (will take some time) address any issues and try again...

Not the answer you're looking for? Browse other questions tagged or ask your own question.