无法在Ubuntu 12.04上安装jdk 1.5

前端之家收集整理的这篇文章主要介绍了无法在Ubuntu 12.04上安装jdk 1.5前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我安装了Ubuntu 12.04.1 LTS(GNU / Linux 3.2.0-23-generic x86_64).有关机器的一些信息:
$grep --color "model name" /proc/cpuinfo
model name  : Intel(R) Xeon(R) cpu           E5430  @ 2.66GHz
model name  : Intel(R) Xeon(R) cpu           E5430  @ 2.66GHz
model name  : Intel(R) Xeon(R) cpu           E5430  @ 2.66GHz
model name  : Intel(R) Xeon(R) cpu           E5430  @ 2.66GHz

我需要安装jdk5来支持旧的应用程序.

我试过了:

~$sudo apt-get install openjdk-5-jdk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package openjdk-5-jdk

我也尝试过:

~$sudo apt-get install sun-java5-jdk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package sun-java5-jdk

所以它在回购中不可用.我试图按照本指南(添加jaunty回购):

http://leonardo-pinho.blogspot.dk/2010/11/java-15-no-ubuntu-1010.html

但结果相同.

然后我试着从这里下载jdk-1_5_0_22-linux-i586.bin:

http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-419410.html#jdk-1.5.0_22-oth-JPR

并做:

~$chmod a+x jdk-1_5_0_22-linux-i586.bin 
~$sudo ./jdk-1_5_0_22-linux-i586.bin 
Sun Microsystems,Inc.  Binary Code License Agreement

yes
Unpacking...
Checksumming...
0
0
Extracting...
./jdk-1_5_0_22-linux-i586.bin: 424: ./jdk-1_5_0_22-linux-i586.bin: ./install.sfx.19556: not found
./jdk-1_5_0_22-linux-i586.bin: 1: cd: can't cd to jdk1.5.0_22

有什么建议?

两个建议:

1)您尝试在64位Linux(GNU / Linux 3.2.0-23-通用x86_64)上安装32位JDK(jdk-1_5_0_22-linux-i586.bin).

JDK 1.5.0_22 Java安装程序(install.sfx.XXXXX)需要运行这些库(来自我的32位Ubuntu 12.04):

$ldd install.sfx.5362 
    linux-gate.so.1 =>  (0x004df000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0x0022e000)
    /lib/ld-linux.so.2 (0x00b96000)

对应于包libc6-i386.安装它(sudo apt-get install libc6-i386)然后重试.

2)使用64位JDK.

猜你在找的Ubuntu相关文章