linux下unzip命令出錯問題

regonly1發表於2012-01-05
linux下用unzip加壓一個zip格式的壓縮檔案,出現如下報錯:
[oracle@DB ~]$ unzip guotai_customer.zip
Archive:  guotai_customer.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of guotai_customer.zip or
        guotai_customer.zip.zip, and cannot find guotai_customer.zip.ZIP, period.

不知道是什麼原因,查了google,發現是因為壓縮檔案大於2G的緣故,使用
jar命令來解壓即可:
jar xvf guotai_customer.zip

執行,發現報錯:
[root@DB ~]# jar
-bash: jar: command not found

要安裝這個包:
java-1.6.0-openjdk-devel

使用yum,內網連不上rh的資源庫。只好自己想辦法從iso安裝包中取。還好,找dvd版的iso中找到了,執行安裝:
[root@DB ~]# rpm -i java-1.6.0-openjdk-devel-1.6.0.0-1.2.b09.el5.i386.rpm
warning: java-1.6.0-openjdk-devel-1.6.0.0-1.2.b09.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
        java-1.6.0-openjdk = 1:1.6.0.0-1.2.b09.el5 is needed by java-1.6.0-openjdk-devel-1.6.0.0-1.2.b09.el5.i386
        libjli.so is needed by java-1.6.0-openjdk-devel-1.6.0.0-1.2.b09.el5.i386
        libjli.so(SUNWprivate_1.1) is needed by java-1.6.0-openjdk-devel-1.6.0.0-1.2.b09.el5.i386

還是報錯,還要依賴其他包,於是把所有可能的都找了出來,然後首先把相近的安裝上去:
[root@DB ~]# rpm -i java-1.6.0-openjdk-1.6.0.0-1.2.b09.el5.i386.rpm
warning: java-1.6.0-openjdk-1.6.0.0-1.2.b09.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

再試試看:
[root@DB ~]# rpm -i java-1.6.0-openjdk-devel-1.6.0.0-1.2.b09.el5.i386.rpm
warning: java-1.6.0-openjdk-devel-1.6.0.0-1.2.b09.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

ok,成功了。

然後執行解壓:
jar xvf guotai_customer.zip

參考連結:
http://hi.baidu.com/dudangyimian/blog/item/66e5c0cdd270a70b01e9289a.html

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12932950/viewspace-714447/,如需轉載,請註明出處,否則將追究法律責任。

相關文章