可以的,CentOS 完全可以打包 AppImage。
AppImage 本身并不依赖某个特定发行版,只要满足以下条件即可在 CentOS 上制作:
AppImage 的本质是:
AppDir(应用目录)appimagetool 打包成单个 .AppImage 文件CentOS 只是“打包环境”,最终生成的 AppImage 可在多数 Linux 发行版运行。
sudo yum install -y git wget fuse
(CentOS 7/8 均可,CentOS 9 Stream 也支持)
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
示例:
MyApp.AppDir/
├── AppRun
├── myapp
├── myapp.desktop
└── myapp.png
示例 myapp.desktop:
[Desktop Entry]
Name=MyApp
Exec=myapp
Icon=myapp
Type=Application
Categories=Utility;
AppRun 示例:
#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
exec "$HERE/myapp" "$@"
chmod +x AppRun myapp
./appimagetool-x86_64.AppImage MyApp.AppDir
生成:
MyApp-x86_64.AppImage
原因:
linuxdeploylinuxdeployqt(Qt 应用)✅ CentOS 服务器编译
✅ CI/CD 中自动生成 AppImage
✅ 企业内网分发 Linux 应用
✔ CentOS 可以打包 AppImage
✔ 推荐 CentOS 7 作为打包环境
✔ 工具简单,跨发行版可用
如果你有:
我可以给你针对性的打包方案。