Brief: This quick tip helps you to get rid of ‘cannot change profile for the next exec call: No such file or directory’ while running Snap packages.
Ubuntu’s universal packaging offering Snap is gaining popularity each day. There might have been some security concerns about Snap but that has not deterred its popularity. There are more and more programs being ported to Snap.
I have written a detailed article about using Snap commands in Ubuntu but this article is not going to discuss that. Actually, I ran into a strange error today with Snap today.
I installed a Snap package and tried to run it like any other program. Only that it threw an error in my face:
cannot change profile for the next exec call: No such file or directory
I thought maybe there was some issue with the program so I installed another application using Snap. Bam! The same error with this application as well:
In this quick post, I am going to share the trick that worked for me to fix this Snap issue.
Fix ‘cannot change profile for the next exec call: No such file or directory’ in Ubuntu and other Linux distributions
After spending plenty of times in Snap documentation, forums and GitHub discussions, I figured out the root cause with my system.
Snap is an offering by Ubuntu and it is highly attached to it. Snap is not properly supported by all (mainly newer) Linux Kernels. Only the Linux kernels provided by Ubuntu can guarantee a smooth functioning of Snap, at present.
This made me realize that I have installed newer Linux kernel sometimes back and have been using the same Linux Kernel (version 4.10). This was the reason why Snap was throwing that error.
So the fix for my problem was simply downgrading the Linux kernel to the latest kernel offered by Ubuntu. I used Ukuu tool for this and I recommend that you use the same.
Did it work for you?
I can understand if the same trick doesn’t work for you. In that case, I suggest contacting the developer of the program and open a bug report.
But if you are using a different Linux kernel, using the Linux kernels provided by Ubuntu should fix the issue for you.
I hope this quick tip helps you to get rid of ‘cannot change profile for the next exec call: No such file or directory’ error with Snap. If you have questions, suggestions or a simple thanks, please feel free to use the comment section below 🙂