2012-11-09 29 views
7

安裝JDK 1.7時,當我在甲骨文的Linux使用以下錯誤在linux

RPM -ivh JDK-7u9-linux的-i586.rpm

安裝JDK 1.7然而我收到以下錯誤,我該如何解決這些錯誤並安裝jdk 1.7?

任何幫助是非常可觀的。

感謝

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

+0

這不是一個編程的問題。事實上,它*看起來像一個基本的系統管理問題......關於如何在Linux機器上安裝Java。 –

+0

@StephenC那麼移動這個問題在哪裏? – user75ponic

+0

superuser.com或serverfault.com,取決於您是否以「專業能力」進行此操作。 (這是一個有點奇怪的區別,國際海事組織...但這就是他們玩的方式。) –

回答

5

1)我同意斯蒂芬ç - 這肯定聽起來像「權限」

2)「命令」 - 你必須明確地爲「根」

3)做一個ls -ld /usr/java/jdk1.7.0_09/使運行命令確定該目錄存在。

如果沒有,可以考慮做一個「MKDIR在/ usr/java的」,並重新運行該命令

4)該線程可能會被遷移到「superuser.com」,這是更多的行政問題

5)如果您還沒有解決方案,請務必指定您的Linux版本。

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

附錄:

的職位給了印象JDK安裝失敗;聽起來像是沒有的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).

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.

+0

我以root身份運行並且目錄/ usr/java確實存在。 – user75ponic

+0

那麼你看看是否存在「/usr/java/jdk1.7.0_09/」?如果沒有,您是否嘗試使用「mkdir /usr/java/jdk1.7.0_09」來查看您是否有權創建它?這是所有基本的故障排除...... PS:你的Linux版本究竟是什麼? – paulsm4

+0

我的linux版本是oracle linux 5.5。謝謝 – user75ponic

2

你可能需要囤的rpm命令,作爲根。

另一種可能性是,SELinux正在阻礙。你有嚴格的政策啓用SELinux執行嗎?

+0

嗨Stephen rpm已經作爲根運行 – user75ponic