Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permision denied for dotnet

Tags:

.net-core

I recently installed dotnet 5.0 on Pop OS but whenever I try to use it it says that I don't have permission.

For example, if I just try to run the command dotnet it gives the the message

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

When I run the command as the root user it works perfectly fine.

I don't know if this is because I installed dotnet as a snap package

like image 233
Jonah Copeland Avatar asked Sep 14 '25 22:09

Jonah Copeland


1 Answers

I had the same issue and unfortunately the dotnet issue page was not working.

To fix this issue I had to install the package with apt instead of snap.

sudo snap remove dotnet-sdk // if needed

wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb

sudo dpkg -i packages-microsoft-prod.deb

sudo apt update

sudo apt install apt-transport-https

sudo apt-get install -y dotnet-sdk-5.0
like image 198
StPaulis Avatar answered Sep 17 '25 20:09

StPaulis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!