【问题标题】:Installing java 5 in ubuntu 11.04在 ubuntu 11.04 中安装 java 5
【发布时间】:2012-05-14 17:21:32
【问题描述】:

我试图在 ubuntu 11.04 中安装 java,为此我下载了“jdk-1_5_0_22-linux-i586.bin”我使用了教程 thisthis

# 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。

【问题讨论】:

    标签: java eclipse jakarta-ee ubuntu-11.04


    【解决方案1】:

    你应该做sudo ./jdk-1_5_0_22-linux-i586.bin,因为你在那个目录没有写权限。但是,root 可以。

    【讨论】:

      【解决方案2】:

      以超级用户权限 sudo 执行您的 bin。 此外,如果你有最新版本的 JDK(我想你有),你可以将源代码的合规级别设置为 1.5

      【讨论】:

        【解决方案3】:

        你需要它的权限。你有两个选择,要么切换到超级用户模式,使用:

        #su

        虽然不鼓励这种方法。 第二种也是最常用也最合适的方法是使用sudo命令,如下:

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

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2012-08-11
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2014-08-10
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多