简体   繁体   English

如何在Linux Mint 17上安装.NET

[英]How to install .NET on Linux Mint 17

I'm having issue with installing .NET on Linux Mint 17. 我在Linux Mint 17上安装.NET时遇到问题。

I've used the steps from here: 我已经使用了这里的步骤:

https://www.microsoft.com/net/core#linuxubuntu 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 ,发生以下错误:

 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? 在Linux中安装.NET和编译代码的正确方法是什么? What IDE should I use? 我应该使用哪种IDE? 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: 然后,您需要注册Microsoft产品Feed,这取决于您的机器上的Mint 17,如下所示:

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. 你应该很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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