Appimagekit: Issues with creating/running an AppImage

Created on 24 May 2017  路  9Comments  路  Source: AppImage/AppImageKit

Trying to create an AppImage for mitmproxy fail using appimagetool, but works using AppImageAssistant and also works with generate_image script

I'm using ubuntu:14.04 docker image to generate the AppImage.

Creating with appimagetool on ubuntu:14.04 - FAIL

Desktop file: /root/build/appimage/Mitmproxy.AppDir/mitmproxy.desktop
Name: Mitmproxy
Icon: mitmproxy
Exec: mitmproxy.wrapper
Comment: An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers
Type: Application
Categories: Utility;Network
File used for determining architecture: /root/build/appimage/Mitmproxy.AppDir/usr/lib/libpython3.5m.so.1.0
Arch: 86_64
App name for filename: Mitmproxy
/root/build/appimage/Mitmproxy.AppDir should be packaged as /root/dist/Mitmproxy-2.0.2.glibc2.17-x86_64.AppImage
Deleting pre-existing .DirIcon
Creating .DirIcon symlink based on information from desktop file
Generating squashfs...
Size of the embedded runtime: 112472 bytes
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on /root/dist/Mitmproxy-2.0.2.glibc2.17-x86_64.AppImage, block size 131072.

FATAL ERROR:gzip uncompress failed with error code -3
Embedding ELF...
Not able to open the AppImage for writing, aborting

Creating/Running with generate_appimage and appimageassistant on ubuntu:14.04 - Works OK

LANG=en_US.UTF-8 ./Mitmproxy-2.0.2.glibc2.17-x86_64.AppImage --version
desktop-file-validate is missing. Skipping /tmp/.mount_igNtNk/usr/bin//mitmproxy.wrapper.
Mitmproxy version: 2.0.2 (release version) 
Python version: 3.5.3
Platform: Linux-4.4.59-boot2docker-x86_64-with-debian-jessie-sid
SSL version: OpenSSL 1.0.1f 6 Jan 2014
Linux distro: debian jessie/sid

Running on cents:6.7 - FAIL

LANG=en_US.UTF-8 ./Mitmproxy-2.0.2.glibc2.17-x86_64.AppImage --version

/bin/bash: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/.mount_l7NTFP/usr/lib/x86_64-linux-gnu/libtinfo.so.5)
/bin/bash: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /tmp/.mount_l7NTFP/usr/lib/x86_64-linux-gnu/libtinfo.so.5)

My project to test this is located at mitmproxy-appimage

Most helpful comment

FWIW, I'm able to work around FATAL ERROR:gzip uncompress failed with error code -3 simply by adding more RAM to the packaging machine.

All 9 comments

It looks like the libtinfo.so.5 inside the AppImage requires a newer glibc version than is present on your target system (CentOS 6.7 in your example). The recommended way to produce an AppImage that would run on CentOS 6.7 would be to build on CentOS 6.x and package using appimagetool. Did you try that as well?

Also, you shouldn't run Docker containers like that. It's a really insecure way to add those capabilities. Also, it won't work on AppArmor protected systems due to restrictions in the default profile. You'd have to deactivate AppArmor there (there's a Docker flag), but that'd introduce even more security issues.

Instead, download the AppImage for appimagetool, then run ./appimagetool.AppImage --appimage-extract, and run squashfs-root/AppRun just like you would run appimagetool.

An example for this non-FUSE approach can be found here: https://github.com/TheAssassin/redeclipse-appimage/blob/master/build-appimage.sh#L158

@probonopd No I did not try using centos to build the image. I'm more familiar with ubuntu. Also do you have an idea why appimagetool did not run?

@TheAssassin can you explain how to properly run docker images for this kind of task? or what do you recommend me do to create the appimages?

I have no idea why you are running into FATAL ERROR:gzip uncompress failed with error code -3 on Ubuntu 14.04 as I am using it all the time with this OS.

The error went away by itself not sure how, anyway I was able to build an appimage using the old eol ubuntu:10.04 LTS Lucid. The appimage works as expected using centos:6.7 and ubuntu:14.04. I was surprise the appimagetool works on theubuntu:10.04 image.

This is because we deliberately build AppImageKit on CentOS 6...

Great work @nandub I tried Mitmproxy-2.0.2.glibc2.9-x86_64.AppImage on ubuntu-budgie-17.04-beta1-desktop-amd64.iso and it ran fine for me.

Beware that building on Ubuntu 10.04/CentOS 6.7 is a horrible idea. They don't receive updates any more, so it's likely that you're bundling outdated and potentially dangerous libraries. CentOS 6.8 is (AFAIK) still receiving updates. If you want to use Ubuntu, use 14.04. You can also use Debian Jessie or openSUSE Leap 42.2.

Edit: You can also build all the libraries that are not on the excludelist yourself, that should be safe, too.

FWIW, I'm able to work around FATAL ERROR:gzip uncompress failed with error code -3 simply by adding more RAM to the packaging machine.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheAssassin picture TheAssassin  路  9Comments

probonopd picture probonopd  路  8Comments

Celti picture Celti  路  7Comments

antony-jr picture antony-jr  路  9Comments

emanresusername picture emanresusername  路  3Comments