Error opening SNAP in Ubuntu

When opening SNAP in Ubuntu, I get the following error message

Clicking “ok” does not start the program.
The folder in question was not writeable to start with, but I changed it, it is writeable and restarted. But this error remains.

Any advice?

Typing “snap” at command line, I found that the error message above does not describe the error correctly. The terminal returns:

java.io.FileNotFoundException: /home/max/.snap/system/lock (Permission denied)

The “lock” folder also needs to be writeable. After fixing this, SNAP opens and runs.

The issue then is, that in Linux, the installation does not give the correct write permissions to all folders within home/user/.snap

This seems to be the first time this error is reported. So I think in
most cases the installation works in Linux. This must be some edge case.
However, thanks for letting us know.

I want to reinstall — also because of some other issues — but

sudo apt-get remove snap

gives the message

Package 'snap' is not installed, so not removed

Do you have an advice on how to uninstall SNAP on Ubuntu?

There should be an uninstall script in the bin folder of the installation. You need to execute this.

You probably did not install SNAP with apt-get, so you obviously cannot remove is using apt-get.

Your original problem is most likely due to the fact that you ran the installer as sudo, but then start snap as a normal user. The installation made /home/max/.snap as a folder that is owned by root, however, so you cannot write to it.
Try chown -R max .snap and start again. Should work.

1 Like

thanks a lot … that seems to have solved the issue … but it seems I had no other way of installing SNAP?

You should also be able to run the installer as a normal user. You cannot install it in a system folder (/opt, /usr/local) in that case, but in e.g. /home/max/snap. If you are the only user on the ubuntu system, that should not be a problem.

Thanks a lot marpet

I want execute uninstall script but it does not work

What kind of error do you get?

When opening SNAP in Ubuntu, I get the following error message

An instance of the program cannot access specified user directory. This is a serious problem that may prevent the program to function properly. Make sure /home/hout/.snap/system is writeable

I erased all SNAP folders and re-install in /home/hout/snap

But I still have the same problem

It seems that you don’t have write permission in the directory /home/hout/.snap/system.
I assume that this is an issue of your system not of SNAP.
Maybe you can relaxe the restrictions on this directory .

I think because I do not have the directory
.snap/system.

This directory is normally created by SNAP.

In which folder I have to install SNAP

It is up to you.
You can use e.g. /opt or $HOME/Apps

thanks a lot marpet
I solved the problem

Sorry. Is there a way to install SNAP 5.0 using apt-get? The only installer I found is esa-snap_sentinel_unix_5_0.sh. Thank you

No, you can’t use apt-get. The installer files provided on the download page are the ones you should use.

Ok. Thank you very much