1. 程式人生 > >AIX 7.1 jar unzip解壓報錯問題解決

AIX 7.1 jar unzip解壓報錯問題解決

aix

剛開始使用jar -xvf 進行解壓也報錯,懷疑jar解壓命令有問題。便安裝了zip相關包再進行解壓還是報錯。

jar 解壓報錯
jar -xvf aix.ppc64_11gR2_database_1of2.zip

inflated: database/stage/Components/oracle.sysman.console.db/11.2.0.1.0/1/DataFiles/filegroup4.jar
java.io.EOFException: Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:241)

at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:159)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:166)
at sun.tools.jar.Main.extractFile(Main.java:753)
at sun.tools.jar.Main.extract(Main.java:716)
at sun.tools.jar.Main.run(Main.java:226)
at sun.tools.jar.Main.main(Main.java:942)

unzip 解壓報錯
unzip aix.ppc64_11gR2_database_1of2.zip -d oracle/

Archive: aix.ppc64_11gR2_database_1of2.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 aix.ppc64_11gR2_database_1of2.zip or
aix.ppc64_11gR2_database_1of2.zip.zip, and cannot find aix.ppc64_11gR2_database_1of2.zip.ZIP, period.

通過網上查詢相關報錯信息,有網友說是上傳沒有在二進制模式下,也有說上傳過程中包有丟失md5值不一致,其中有一條說的系統有限制導致ftp上傳不完整。

經檢查FTP 上傳時提示有限制報錯,如下:
C:\Users\Forrest>ftp 192.168.1.248
連接到 192.168.1.248。
220 localhost FTP server (Version 4.2 Sat Aug 7 19:39:41 CDT 2010) ready.
用戶(192.168.1.248:(none)): root
331 Password required for root.
密碼:
230-Last login: Wed Dec 31 22:52:13 CST 1969 on /dev/pts/0 from 192.168.1.118
230 User root logged in.
ftp> bin
200 Type set to I.
ftp>
ftp> put D:\迅雷下載\aix.ppc64_11gR2_database_1of2.zip
200 PORT command successful.
150 Opening data connection for aix.ppc64_11gR2_database_1of2.zip.
452 Error writing file: A file cannot be larger than the value set by ulimit.
ftp: 發送 1073741824 字節,用時 251.31秒 4272.58千字節/秒。
ftp>

查看AIX當前的size數值,該數值表示用戶創建的文件大小限制。此定義值(512字節為單位)為該用戶可以生成的最大文件的大小。

ulimit -f
2097151

cat /etc/security/limits

default:
fsize = 2097151
core = 2097151
cpu = -1
data = 262144
rss = 65536
stack = 65536
nofiles = 2000

此處輸出後段省略

將其fsize更改為-1,使該參數無大小限制。

為使/etc/security/limits文件的更改生效,用戶必須註銷當前登錄會話並重新登錄。

重新上傳再解壓即正常沒有報錯

AIX 7.1 jar unzip解壓報錯問題解決