我尝试在ubuntu11.04中安装java,我下载了"jdk-1_5__22-linux-i586.bin“,为此我使用了教程this和this
# 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。
发布于 2012-05-15 01:23:44
您应该执行sudo ./jdk-1_5_0_22-linux-i586.bin,因为您在该目录中没有写权限。然而,root做到了。
发布于 2012-05-15 01:31:05
使用超级用户权限sudo执行您的bin。此外,如果您有最新版本的JDK (我想您有),可以将源代码的遵从性级别设置为1.5
发布于 2012-05-15 01:41:21
您需要它的权限。您有两个选项,使用以下命令切换到超级用户模式:
#su
尽管不鼓励使用这种方法。第二种也是最常见、最合适的方法是使用sudo命令,如下所示:
#sudo ./jdk-1_5_0_22-linux-i586.bin
https://stackoverflow.com/questions/10588106
复制相似问题