2017-04-14 160 views
0

我在與Linux Mint的安裝.NET問題17.如何在Linux Mint的安裝.NET 17

我用從這裏步驟:

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

當我運行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.

我該如何解決這個問題? 在Linux中安裝.NET和編譯代碼的正確方法是什麼? 我應該使用什麼IDE? 謝謝。

回答

1

您是否嘗試添加修復標誌?有時候,這有助於解決依賴性問題。

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

0

試試這個:

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

然後使用

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

然後,你需要註冊微軟產品飼料的命令註冊鍵,這取決於你的機器上的薄荷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 

現在你幾乎好安裝它,你應該把所有的依賴關係,以便剛:

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

你應該是好去。