Al instalar el RPM de Java 1.8 en Centos 5 (32 bit) aparecen unos errores extraños y el paquete se queda mal instalado. Es posible que el problema no esté relacionado con la versión de Centos.
$ sudo rpm -i jdk-8u102-linux-i586.rpm Unpacking JAR files... tools.jar... /var/tmp/rpm-tmp.26482: /usr/java/jdk1.8.0_102/bin/unpack200: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory Error: unpack could not create JAR file: /usr/java/jdk1.8.0_102/lib/tools.jar Please refer to the Troubleshooting section of the Installation Instructions on the download page.
Solución:
Instalar glibc
$ sudo yum install glibc ... Setting up Install Process Package glibc-2.5-123.el5_11.3.x86_64 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package glibc.i686 0:2.5-123.el5_11.3 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: glibc i686 2.5-123.el5_11.3 updates 5.4 M Transaction Summary ================================================================================ Install 1 Package(s) Upgrade 0 Package(s) Total download size: 5.4 M Is this ok [y/N]: y Downloading Packages: glibc-2.5-123.el5_11.3.i686.rpm | 5.4 MB 00:01 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : glibc 1/1 Installed: glibc.i686 0:2.5-123.el5_11.3 Complete!
Por algún extraño motivo, el fichero RPM tienen distinto nombre que el paquete que se instala:
$ sudo rpm -qa|grep jdk java-1.7.0-openjdk-devel-1.7.0.101-2.6.6.1.el5_11 jdk1.8.0_102-1.8.0_102-fcs
Eliminamos el paquete que ha fallado (con el nombre correcto):
$ sudo rpm --erase jdk1.8.0_102-1.8.0_102-fcs
Y probamos de nuevo a instalar el JDK de Java:
$ sudo rpm -i jdk-8u102-linux-i586.rpm Unpacking JAR files... tools.jar... plugin.jar... javaws.jar... deploy.jar... rt.jar... jsse.jar... charsets.jar... localedata.jar...
Esta vez todo ha ido bien. Ya tenemos Java 1.8 en Centos 5.x:
$ java -version java version "1.8.0_102" Java(TM) SE Runtime Environment (build 1.8.0_102-b14) Java HotSpot(TM) Server VM (build 25.102-b14, mixed mode)