简体   繁体   中英

How to install .NET on Linux Mint 17

I'm having issue with installing .NET on Linux Mint 17.

I've used the steps from here:

https://www.microsoft.com/net/core#linuxubuntu

When I run sudo apt-get install dotnet-dev-1.0.1 the following errors occurred:

 sudo apt-get install dotnet-dev-1.0.1 Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: dotnet-dev-1.0.1 : Depends: dotnet-sharedframework-microsoft.netcore.app-1.0.4 but it is not going to be installed Depends: dotnet-sharedframework-microsoft.netcore.app-1.1.1 but it is not going to be installed E: Unable to correct problems, you have held broken packages. 

How should I fix that? What is the proper way to install .NET and compile code in Linux? What IDE should I use? Thanks.

Have you tried adding in the fix flag? Sometimes that helps with dependency issues.

sudo apt-get -f install dotnet-dev-1.0.1

try this:

sudo apt-get update    
sudo apt-get install curl libunwind8 gettext apt-transport-https

then register the keys using the commands

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

Then you need to register the Microsoft product feed and this depends on your machine for Mint 17 its like this:

sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main" > /etc/apt/sources.list.d/dotnetdev.list'    
sudo apt-get install apt-transport-https

Now you're pretty much good to install it, you should have all your dependencies so just :

sudo apt-get update    
sudo apt-get install dotnet-sdk-2.1.4

You should be good to go.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM