在Linux中安装JDK 1.7时出现错误 [英] Errors when installing jdk 1.7 in linux

查看:192
本文介绍了在Linux中安装JDK 1.7时出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我通过使用以下命令在Oracle Linux中安装jdk 1.7时

When I am installing jdk 1.7 in Oracle Linux by using the following

rpm -ivh jdk-7u9-linux-i586.rpm

rpm -ivh jdk-7u9-linux-i586.rpm

但是,我遇到以下错误,如何解决这些错误并安装jdk 1.7?

However I am getting the following errors, how can I resolve these errors and install jdk 1.7?

任何帮助都是非常重要的.

Any help is highly appreciable.

谢谢

rpm -ivh /tmp/mnt/jdk-7u9-linux-i586.rpm
Preparing...                ########################################### [100%]
   1:jdk                    ########################################### [100%]
Unpacking JAR files...
        rt.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/rt.pack
        jsse.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/jsse.pack
        charsets.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/charsets.pack
        tools.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_09/lib/tools.pack
        localedata.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/ext/localedata.pack
        plugin.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/plugin.pack
        javaws.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/javaws.pack
        deploy.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_09/jre/lib/deploy.pack

我的Linux版本是oracle linux 5.5

My Linux version is oracle linux 5.5

推荐答案

1)我同意斯蒂芬·C-的确听起来像是许可"

1) I agree with Stephen C - this definitely sounds like "permissions"

2)"sudo"-您必须绝对以"root"身份运行命令

2) "sudo" - you must definitely run the command as "root"

3)执行ls -ld /usr/java/jdk1.7.0_09/以确保目录存在.

3) Do an ls -ld /usr/java/jdk1.7.0_09/ to make sure the directory exists.

如果没有,请考虑执行"mkdir/usr/java"并重新运行命令

If it doesn't, consider doing a "mkdir /usr/java" and re-running the command

4)该线程可能会迁移到"superuser.com",更多用于管理问题

4) This thread will probably be migrated to "superuser.com", which is more for administrative questions

5)如果您仍然没有解决方案,请确保指定您的Linux版本.

5) If you still don't have a solution, please be sure to specify your Linux version.

================================================ ==================================

==================================================================================

附录:

帖子给人的印象是JDK安装失败;听起来RPM的 none 都没有提取.

The post gave the impression the JDK install failed; it sounded like none of the RPM was getting extracted.

根据后续信息,听起来像只是警告:

Based on the subsequent information, it sounds like it's merely a warning:

  • http://www.geilthings.com/wiki/Java#1.7.x

在版本7u9中,显示以下与文件有关的错误消息 扩展包,用于Java应用程序的工具中, 使用Java Web Start.这不会影响 通过此二进制软件包格式在您的系统上安装的JRE (RPM).

In version 7u9, shows the following error messages related to file extension pack, which is used in the facilities of Java applications, using Java Web Start. This does not affect the functionality of the JRE installed on your system, made ​​by this binary package format (RPM).

  • http://forums.fedoraforum.org/showthread.php?t=285076

您的Sun jdk-7u7-linux-x64.rpm安装成功.错误 显示的消息是正常的.之所以存在,是因为这些文件不存在 存在于包装中.我在安装Sun jre rpm时得到了它们 包.只需忽略这些特定的错误消息即可.

Your install of Sun jdk-7u7-linux-x64.rpm was successful. The error messages displayed, are normal. They exist because those files don't exist in the package. I get them when installing the Sun jre rpm packages. Just ignore those particular error messages.

这篇关于在Linux中安装JDK 1.7时出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆