在生产环境中,需要把安装包从本地传到服务器上,传输过程中网络抖动的原因造成大文传输失败。可以将文件分包压缩成200M或500M大小的文件,然后分批传输到服务器。最近生产环境传输了starrocks的安装包,分包压缩之后上传服务器文件,然后合成一个大包,在进行解压的时候出现解压失败的问题。根据报错提示增加环境变量,将问题解决。
#多个包合成一个包
[root@test 14:13:53]:/opt/sr/SR2.5 #cat sr2.5.z* >> Starrocks2.5.zip
#解压报错
#unzip Starrocks2.5.zip
Archive: Starrocks2.5.zip
error: End-of-centdir-64 signature not where expected (prepended bytes?)
(attempting to process anyway)
warning [Starrocks2.5.zip]: zipfile claims to be last disk of a multi-part archive;
attempting to process anyway, assuming all parts have been concatenated
together in order. Expect "errors" and warnings...true multi-part support
doesn't exist yet (coming soon).
warning [Starrocks2.5.zip]: 2097152000 extra bytes at beginning or within zipfile
(attempting to process anyway)
file #1: bad zipfile offset (local header sig): 2097152004
(attempting to re-compensate)
creating: SR2.5/
error: invalid zip file with overlapped components (possible zip bomb)
To unzip the file anyway, rerun the command with UNZIP_DISABLE_ZIPBOMB_DETECTION=TRUE environmnent variable
UNZIP_DISABLE_ZIPBOMB_DETECTION=TRUE
export UNZIP_DISABLE_ZIPBOMB_DETECTION
[root@test 14:14:19]:/opt/sr/SR2.5 #cd ..
[root@test 14:17:50]:/opt/sr #unzip Starrocks2.5.zip
这个问题记录在草稿箱存了一段时间了,趁着23的尾巴处理了一下。其实最重要的就是 设置环境变量解决 那两行命令。
欢迎评论,转发,点赞,收藏~