runtime: Installing through snap fails to create symlink

@tristan957 commented on Wed Jun 06 2018

I tried to run the dotnet tool. Ended having to call it like this:

dotnet-sdk.dotnet help
ln: failed to create symbolic link '/var/snap/dotnet-sdk/18/Microsoft.NETCore.App/2.1.0': No such file or directory```

I installed it through snap using the commands in the README on Solus 


About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 6
  • Comments: 26 (6 by maintainers)

Most upvoted comments

@tristan957 , the need to call dotnet using dotnet-sdk.dotnet has to do with how Snaps are constructed and exposed commands are accessed and the way that all interacts with the dotnet host. Retaining the Snap namespace for calling dotnet was the direction we wanted to experiment with first as it will allow distinct calling of install SDKs and Runtime versions.

The easiest way to enable `dotnet <verb> for you will be to use Snap’s alias feature. The following will get you going but will essentially tie the dotnet command to this Snap installed SDK.

sudo snap alias dotnet-sdk.dotnet dotnet

This unfortunately does not get us past the SSL errors when projects are trying to restore.

I just ran into this. I wasted probably 20 minutes (including time finding this issue).

Could the recommendation to run the alias command be added to the installation? I have seen other snaps open windows with similar directions.

If you want the alias "dotnet’ you can create it yourself with the following command.

sudo snap alias dotnet-sdk.dotnet dotnet

This is a snap predefined behavior AFAIK. It is so in order to prevent binary names clashing. If you don’t have another dotnet binary in your system or you don’t plan to, you can safely run sudo snap alias dotnet-sdk.dotnet dotnet to alias the snap binary to the classic dotnet command.

So it appears that the normal dotnet command is available via dotnet-sdk.dotnet eg dotnet-sdk.dotnet --version. I’m not sure if this is intended behavior, but was definitely unexpected.

Using notes from above, sudo snap alias dotnet-sdk.dotnet dotnet does make the normal dotnet command available. It’s a bit annoying that this is something that would have to be managed manually. I’m also curious what sort of side-effects this might have.

Same issue here… on ubuntu 18.04 installed with sudo snap install dotnet-sdk --classic

Having this issue aswell.

@tristan957 I’m not sure by what “Ended having to call it like this:” means. Did it work with dotnet-sdk.dotnet help but not just dotnet help?

Is the dotnet executable in your path?