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)
@tristan957 , the need to call dotnet using
dotnet-sdk.dotnethas 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 dotnetThis 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.
This is a snap predefined behavior AFAIK. It is so in order to prevent binary names clashing. If you don’t have another
dotnetbinary in your system or you don’t plan to, you can safely runsudo snap alias dotnet-sdk.dotnet dotnetto alias the snap binary to the classicdotnetcommand.So it appears that the normal
dotnetcommand is available viadotnet-sdk.dotnetegdotnet-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 dotnetdoes make the normaldotnetcommand 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 --classicHaving 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 helpbut not justdotnet help?Is the
dotnetexecutable in your path?