Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running AppImage #153

Closed
anki-code opened this issue Mar 10, 2021 · 1 comment
Closed

Running AppImage #153

anki-code opened this issue Mar 10, 2021 · 1 comment

Comments

@anki-code
Copy link

anki-code commented Mar 10, 2021

Hi!

Is there a way to run AppImage with alpine-pkg-glibc on Alpine?

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

@anki-code
Copy link
Author

anki-code commented Mar 10, 2021

Yes! It works! My first try with the xonsh shell:

# here most of special flags is to allow using FUSE in docker
docker run -it --rm --cap-add SYS_ADMIN --device /dev/fuse \
    --security-opt apparmor:unconfined --cap-add MKNOD alpine /bin/sh

# Download xonsh
wget https://github.com/xonsh/xonsh/releases/download/0.9.27/xonsh-x86_64.AppImage
chmod +x xonsh-x86_64.AppImage


# First try without alpine-pkg-glibc
./xonsh-x86_64.AppImage 
# /bin/sh: ./xonsh-x86_64.AppImage: not found


# Install alpine-pkg-glibc (from README)
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.33-r0/glibc-2.33-r0.apk
apk add glibc-2.33-r0.apk

# Second try with alpine-pkg-glibc
./xonsh-x86_64.AppImage
# ./xonsh-x86_64.AppImage: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory


# Locales (from README)
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.33-r0/glibc-bin-2.33-r0.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.33-r0/glibc-i18n-2.33-r0.apk
apk add glibc-bin-2.33-r0.apk glibc-i18n-2.33-r0.apk
/usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8

# Third try
./xonsh-x86_64.AppImage
# dlopen(): error loading libfuse.so.2
# AppImages require FUSE to run. 
# You might still be able to extract the contents of this AppImage 
# if you run it with the --appimage-extract option. 
# See https://github.com/AppImage/AppImageKit/wiki/FUSE 
# for more information


# Test extraction
./xonsh-x86_64.AppImage --appimage-extract
# Working!


apk add fuse
apk add bash   # to avoid "execv error: No such file or directory"

# Fourth try
./xonsh-x86_64.AppImage
# Welcome to the xonsh shell (0.9.27.dev16) 

It works! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant