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

Not able to run .NET 6 SDK #7627

Closed
uniprogr opened this issue Jul 23, 2022 · 5 comments
Closed

Not able to run .NET 6 SDK #7627

uniprogr opened this issue Jul 23, 2022 · 5 comments
Labels
area-setup Issues related to installing .NET Core area-tutorials Issues related to getting started tutorials

Comments

@uniprogr
Copy link

Problem encountered on https://dotnet.microsoft.com/en-us/learn/dotnet/hello-world-tutorial/intro
Operating System: Linux, Ubuntu 20.04

Installed .NET 6 from hello world tutorial, followed all the instructions but system cannot detect .net when I type in the 'dotnet' command in the terminal. I get this error:

cannot exec "/snap/dotnet-sdk/174/snap/command-chain/snapcraft-runner": permission denied

It does work when I give permission using sudo, but can I program does it function properly with this permission problem?

@pratikkabade
Copy link

It is caused because of improper installation. Reinstall dotnet 6.0

wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

then install runtime

sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y aspnetcore-runtime-6.0

Reference

@mairaw mairaw added area-tutorials Issues related to getting started tutorials area-setup Issues related to installing .NET Core labels Jul 25, 2022
@Fighter19
Copy link

I had a similar problem and solved it by doing following:

https://stackoverflow.com/a/70931715/3855642

Essentially, remove the existing symlink and create a new one.

sudo rm /usr/local/bin/dotnet
sudo ln -s /snap/dotnet-sdk/current/dotnet /usr/local/bin/dotnet

@Dylanthemachine
Copy link

Dylanthemachine commented Jul 28, 2022 via email

@GODINME
Copy link

GODINME commented Jul 29, 2022

#7634 (comment)

@leecow
Copy link
Member

leecow commented Jun 9, 2023

This particular issue should be resolved in snap installs.

@leecow leecow closed this as completed Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-setup Issues related to installing .NET Core area-tutorials Issues related to getting started tutorials
Projects
None yet
Development

No branches or pull requests

7 participants