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

Appimage does not launch (execv error: No such file or directory) #1004

prog-amateur opened this issue Nov 15, 2019 · 8 comments


Copy link

prog-amateur commented Nov 15, 2019

History :
Hello, I am sure you know Veracrypt app. It has a very useful portable version for Windows (to make it executable from a USB device) but not for Linux.
Thank to the developer, there is a generic installer with tar.bz2 which can extract the files instead of installing on the computer (it means there is binaries, images, and desktop file included).

Problem :
AppImage is the ideal tool to make it executable as a portable app, but... I am not a developer (if only you knew about my job, it has nothing to do with it).

I followed step by step an excellent tutorial from @probonopd , everything goes well (I even have a Success message at the end). Unfortunately, when I launch Veracrypt.AppImage, absolutely nothing happens. From the CLI, the message is as bellow:
execv error: No such file or directory

What do you think of that? I can't find the reason for this bug, however, I'm sure I'm very close to succeeding, it's frustrating. Thank you very much for your help!

Information about the step-by-step procedure I have followed :

# 1. Make the AppDir : 

cd ~/Documents
mkdir -p veracrypt/veracrypt.AppDir

# 2. Download the generic Veracrypt linux installer : 

wget -c
tar -xf veracrypt-1.24-Hotfix1-setup.tar.bz2 -C veracrypt_archive/
cd veracrypt_archive

# 3. Accept the license, select extract and go to /tmp to extract the tar.gz content into the AppDir : 

cd /tmp
tar -xf veracrypt_1.24-Hotfix1_amd64.tar.gz -C ~/Documents/veracrypt/veracrypt.AppDir/

# 4. In "/usr/share/applications/veracrypt.desktop" file, add "Version=1.0" below "Encoding=UTF-8" line and edit "Categories" line as "Categories=Utility;". Otherwise, I have "deprecated" error messages. 

# 5. Organize the AppDir and make the AppRun executable : 

cd ~/Documents/veracrypt/veracrypt.AppDir/
cp ./usr/share/pixmaps/veracrypt.xpm .
cp ./usr/share/applications/veracrypt.desktop .
wget -c
chmod a+x AppRun-x86_64

# 6. Package the AppDir as an AppImage : 

cd ..
wget -c
chmod a+x appimagetool-x86_64.AppImage
./appimagetool-x86_64.AppImage veracrypt.AppDir ./Veracrypt-x86_64.AppImage

# 7. Launch Veracrypt-x86_64.AppImage (this is where I have the error message : execv error: No such file or directory) : 


Copy link

prog-amateur commented Nov 15, 2019

Also just to say that after changing name from AppRun-x86_64 to AppRun, the error message seems to be "better" : I suspect a path issue in the desktop file :

Error: Error executing '/usr/bin/veracrypt': No such file or directory

Copy link

OK ! I have found a workaround : I have copy-paste veracrypt bin into the veracrypt.AppDirfolder.
Then, I have edited the veracrypt.desktop file as below :

[Desktop Entry]

I still don't understand why the path was marked as an error. I leave this issue opened a few time in order to let you answer me, and I hope to not forget to close it if you don't answer. Once again, thank you for your help.

Copy link

You should never use absolute paths in a desktop file. It might work when installed on a system, but for AppImages it's a no-go.

The runtime shouldn't write execv error, we could check for the existence of AppRun and write a proper error message. In fact, both the runtime and appimagetool should write proper error messages.

You should try to get rid of this AppRun binary thing. Perhaps you can switch to linuxdeploy?

Copy link

I have succeed to make it work only if I put the binary on the AppDir folder.
Do you succeed to make AppImage executable from USB drive (kind of portable mode) ? I can use my AppImage runs only out of my USB drive (it seems like a security from Linux). Do you have a tip or a tutorial link to make me run it from USB drive ? thank you very much.

Copy link

Nothing special should be needed to run an AppImage from a USB drive. However, if your USB drive is FAT formatted, you may need this ugly workaround:

Copy link

HiranChaudhuri commented Jan 21, 2022

Today I also perceive the same issue. This is my first AppImage so I have no successful projects to compare with.
I read
I especially followed
When I was ready to package my AppDir, I was searching how to run it (that seems not part of the guide) but found
I got surprised by the fact that the presence of the custom keys triggered error messages, so I removed them again...
...and ended up with a file ending in .appimage.

When trying to run this appimage, I get the following output:

$ ls -l *.appimage
-rwxr-xr-x 1 hiran hiran 59212992 Jan 21 11:12 Nexus-1.0-SNAPSHOT-x86_64.appimage
$ ./Nexus-1.0-SNAPSHOT-x86_64.appimage 
execv error: No such file or directory

I validated the application starts up correctly when running from the AppDir. Right now I have no idea what to troubleshoot.
Any advice welcome

Copy link

HiranChaudhuri commented Jan 21, 2022

Without further knowledge I simply started the appimage using strace:

$ strace ./Nexus-1.0-SNAPSHOT-x86_64.appimage

and stumbled over this line:

execve("/tmp/.mount_Nexus-rJ3MLl/AppRun", ["target/Nexus-1.0-SNAPSHOT-x86_64"...], 0x1dd61c0 /* 65 vars */) = -1 ENOENT (No such file or directory)
dup(2)                                  = 4
fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR)
fstat(4, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1), ...}) = 0
write(4, "execv error: No such file or dir"..., 39execv error: No such file or directory

which told me that the entrypoint literally has to be named AppDir. From the documentation I feel this was not entirely clear since after all some of the files in AppDir have to be named according to the application you want to wrap.

Renaming my entry point application to AppDir resolved the issue.
Such a dumb error could and should have been caught when running appimagetool.

Also please add a documentation section about troubleshooting in the packaging guide.

Copy link

It's AppRun, not AppDir. This has been documented in the AppDir specification, see

Feel free to send a PR that validates AppRun in some ways.

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

No branches or pull requests

4 participants