簡體   English   中英

在ubuntu 11.04中安裝java 5

[英]Installing java 5 in ubuntu 11.04

我試圖在Ubuntu 11.04安裝java,我下載“的jdk-1_5_0_22 - Linux的i586.bin,而”為此,我使用教程這個這個

# sudo mv jdk-1_5_0_22-linux-i586.bin /usr/lib/jvm
# cd /usr/lib/jvm
# chmod +x jdk-1_5_0_22-linux-i586.bin
# ./jdk-1_5_0_22-linux-i586.bin

當我執行命令# ./jdk-1_5_0_22-linux-i586.bin我收到以下錯誤消息

Do you agree to the above license terms? [yes or no] 
y
Unpacking...
./jdk-1_5_0_22-linux-i586.bin: 394: cannot create install.sfx.3350: Permission denied
Checksumming...
/usr/bin/sum: install.sfx.3350: No such file or directory
expr: syntax error
expr: syntax error
chmod: cannot access `install.sfx.3350': No such file or directory
Extracting...
./jdk-1_5_0_22-linux-i586.bin: 424: ./install.sfx.3350: not found
mkdir: cannot create directory `jdk1.5.0_22/jre': No such file or directory
mkdir: cannot create directory `jdk1.5.0_22/jre/.systemPrefs': No such file or directory
touch: cannot touch `jdk1.5.0_22/jre/.systemPrefs/.system.lock': No such file or directory
chmod: cannot access `jdk1.5.0_22/jre/.systemPrefs/.system.lock': No such file or directory
touch: cannot touch `jdk1.5.0_22/jre/.systemPrefs/.systemRootModFile': No such file or directory
chmod: cannot access `jdk1.5.0_22/jre/.systemPrefs/.systemRootModFile': No such file or directory
cd: 751: can't cd to jdk1.5.0_22

我是ubuntu環境的新手,我正在嘗試用Java EE設置eclipse。

您應該執行sudo ./jdk-1_5_0_22-linux-i586.bin ,因為您在該目錄中沒有寫入權限。 但是, root確實如此。

使用超級用戶權限sudo執行您的bin。 此外,如果您有最新版本的JDK(我想你這樣做),您可以將源的合規級別設置為1.5

您需要權限。 您有兩個選項,可以切換到超級用戶模式,使用:

#su

雖然不鼓勵這種方法。 第二種也是最常用和最合適的方法是使用sudo命令,如:

#sudo ./jdk-1_5_0_22-linux-i586.bin

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM