Install4j Linux 安装程序不工作

Install4j Linux installer not working

我为我的应用程序制作了安装程序,它适用于 Windows 和 Mac,但是当我尝试 运行 linux 上的 .sh 安装程序文件时,它失败并出现此错误:

gzip: sfx_archive.tar.gz: not in gzip format

I am sorry, but the installer file seems to be corrupted. If you downloaded that file please try it again. If you transfer that file with ftp please make sure that you are using binary mode.

我该如何解决这个问题?

谢谢。

我想问题是您正在尝试使用带有 z 标志的 tar 来提取 sfx_archive.tar.gz,并且它实际上不是 gzip 压缩的。

我会尝试用以下内容替换您当前的 tar 命令:

tar -xvf sfx_archive.tar.gz

错误消息描述了可能的原因:

I am sorry, but the installer file seems to be corrupted. If you downloaded that file please try it again. If you transfer that file with ftp please make sure that you are using binary mode.

您可能以行尾被替换或安装程序脚本被截断的方式将其传输到 Linux 机器。

这可能是因为您在文本查看器中打开了文件,这可能会更改文件的某些方面。尝试重新下载它并 运行 它而不打开它。

chmod +x install_file.sh 
./install_file.sh