Dot-Net

Ubuntu - 安裝 .net 核心

  • May 19, 2016

我想嘗試新的 .net 核心。我正在遵循<https://www.microsoft.com/net/core>上的指示,但它不起作用。

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.0-preview1-002702 : Depends: dotnet-sharedframework-microsoft.netcore.app-1.0.0-rc2-3002702 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我正在執行 ubuntu 16.04。

更新見最後。(感謝Prasanna

.NET 核心現在支持 Ubuntu 14.04、16.04、16.10 和 Linux Mint 17。

請查看官方頁面了解所有詳細資訊。

今天(2016 年 5 月)僅支持 Ubuntu 14.04。

我通過添加成功地將它安裝在 Ubuntu 15.10 上

deb http://security.ubuntu.com/ubuntu trusty-security main

到 /etc/apt/sources-list

完成後,您應該這樣做:

apt-get update

apt-get upgrade

再次命令

apt-get install dotnet-dev-1.0.0-preview1-002702a

它會要求安裝額外的軟體包;你回答是,你就完成了!

通過鍵入測試

dotnet --version

享受!

更新

引用自:https://stackoverflow.com/questions/37322843