Ubuntu - 安装 .net 核心
Ubuntu - Installing .net core
我想试用新的 .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.
UPDATED see at the end. (thanks to Prasanna)
.NET core now supports Ubuntu 14.04, 16.04, 16.10 & Linux Mint 17.
Please check the official page for all the details.
今天(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
尽情享受吧!
已更新
现在 .NET 核心支持 ubuntu 16.04.
请查看link了解更多详情
https://www.microsoft.com/net/core#linuxubuntu
You need to setup the apt-feed first for ubuntu 16.04.
Remove previous .net core versions from your system if any
Then install .net core sdk
尝试安装依赖包 dotnet-sharedframework-microsoft.netcore.app 会得到下一个错误,说这个包依赖于 libicu52 但它是不可安装的
http://packages.ubuntu.com/pl/trusty/amd64/libicu52/download
并下载 .deb 包。现在,转到下载位置并按 运行ning 安装软件包:
sudo dpkg -i libicu52_52.1-3ubuntu0.4_amd64.deb
现在,您将能够运行以下命令:
sudo apt-get install dotnet-sharedframework-microsoft.netcore.app-1.0.0-rc2-3002702
sudo apt-get install dotnet-dev-1.0.0-preview1-002702
dotnet --version
祝你好运
来源:http://zablo.net/blog/post/run-and-debug-asp-net-core-rc2-ubuntu-16-04
我在同一条船上。我想在没有所有这些安装麻烦的情况下尝试它。我走了 docker 路线,发现起床和 运行 宁要简单得多。此外,在尝试后更容易清理,因为我需要做的就是删除容器和图像。
我走这条路的另一个原因是因为我使用的是 Ubuntu 15.10,它 官方 不兼容 Ubuntu 的 .Net Core 安装。因此,与其将我的发行版升级到 "try",docker 是一个更好的途径。
我运行它在交互式shell,这样我就可以运行我的代码:
docker run -it --name dotnet -v /home/me/tmp/:/tmp/project microsoft/dotnet /bin/bash
.. 然后只需在我的 /home/me/tmp 目录中使用文本编辑器编写一些示例代码,当我想要 运行 它时,我只需转到容器 shell 并执行dotnet run
.
参见:
我也遇到了同样的问题。我检查了很多解决方案。但他们没有工作。最后我发现我遵循了他们的 'Ubuntu 16.10' 指令而不是 'Ubuntu 16.04'。他们之间有点区别。确保您遵循了正确的说明。
这个包依赖于 libicu52。您需要从以下 url.
下载 .deb 包
> http://packages.ubuntu.com/pl/trusty/amd64/libicu52/download
现在,使用以下命令安装它。
> sudo dpkg -i libicu52_52.1-3ubuntu0.4_amd64.deb
您可以使用此命令安装 .net 核心。
> apt-get install dotnet-dev-1.0.0-preview1-002702a
检查您安装的版本。
> dotnet --version
2018 年 9 月 - Ubuntu:
上的 .NET Core 安装超级简单
注册 Microsoft 密钥、产品存储库并安装所需的依赖项:
重要提示:将以下路径中的 18.04 更改为您的 Ubuntu 版本(即:17.10、16.04 等)
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
现在更新可用包列表并安装您的 SDK
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1
完成!
附加信息:
对我来说(2018 年 9 月末)是 2.1 版,但您可以像这样检查更新的版本:
sudo apt-cache search dotnet-sdk
另外请注意: Microsoft 在他们的官方页面 (here) 推荐使用 sudo apt-get install apt-安装 dotnet-sdk-your_version 之前的 transport-https。这不再是必需的,因为(来自包描述):
Description-en: transitional package for https support
This is a dummy transitional package - https support has been moved into
the apt package in 1.5. It can be safely removed.
所以请跳过这个。
我想试用新的 .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.
UPDATED see at the end. (thanks to Prasanna)
.NET core now supports Ubuntu 14.04, 16.04, 16.10 & Linux Mint 17.
Please check the official page for all the details.
今天(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
尽情享受吧!
已更新
现在 .NET 核心支持 ubuntu 16.04.
请查看link了解更多详情
https://www.microsoft.com/net/core#linuxubuntu
You need to setup the apt-feed first for ubuntu 16.04.
Remove previous .net core versions from your system if any
Then install .net core sdk
尝试安装依赖包 dotnet-sharedframework-microsoft.netcore.app 会得到下一个错误,说这个包依赖于 libicu52 但它是不可安装的
http://packages.ubuntu.com/pl/trusty/amd64/libicu52/download
并下载 .deb 包。现在,转到下载位置并按 运行ning 安装软件包:
sudo dpkg -i libicu52_52.1-3ubuntu0.4_amd64.deb
现在,您将能够运行以下命令:
sudo apt-get install dotnet-sharedframework-microsoft.netcore.app-1.0.0-rc2-3002702
sudo apt-get install dotnet-dev-1.0.0-preview1-002702
dotnet --version
祝你好运
来源:http://zablo.net/blog/post/run-and-debug-asp-net-core-rc2-ubuntu-16-04
我在同一条船上。我想在没有所有这些安装麻烦的情况下尝试它。我走了 docker 路线,发现起床和 运行 宁要简单得多。此外,在尝试后更容易清理,因为我需要做的就是删除容器和图像。
我走这条路的另一个原因是因为我使用的是 Ubuntu 15.10,它 官方 不兼容 Ubuntu 的 .Net Core 安装。因此,与其将我的发行版升级到 "try",docker 是一个更好的途径。
我运行它在交互式shell,这样我就可以运行我的代码:
docker run -it --name dotnet -v /home/me/tmp/:/tmp/project microsoft/dotnet /bin/bash
.. 然后只需在我的 /home/me/tmp 目录中使用文本编辑器编写一些示例代码,当我想要 运行 它时,我只需转到容器 shell 并执行dotnet run
.
参见:
我也遇到了同样的问题。我检查了很多解决方案。但他们没有工作。最后我发现我遵循了他们的 'Ubuntu 16.10' 指令而不是 'Ubuntu 16.04'。他们之间有点区别。确保您遵循了正确的说明。
这个包依赖于 libicu52。您需要从以下 url.
下载 .deb 包> http://packages.ubuntu.com/pl/trusty/amd64/libicu52/download
现在,使用以下命令安装它。
> sudo dpkg -i libicu52_52.1-3ubuntu0.4_amd64.deb
您可以使用此命令安装 .net 核心。
> apt-get install dotnet-dev-1.0.0-preview1-002702a
检查您安装的版本。
> dotnet --version
2018 年 9 月 - Ubuntu:
上的 .NET Core 安装超级简单注册 Microsoft 密钥、产品存储库并安装所需的依赖项:
重要提示:将以下路径中的 18.04 更改为您的 Ubuntu 版本(即:17.10、16.04 等)
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
现在更新可用包列表并安装您的 SDK
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1
完成!
附加信息:
对我来说(2018 年 9 月末)是 2.1 版,但您可以像这样检查更新的版本:
sudo apt-cache search dotnet-sdk
另外请注意: Microsoft 在他们的官方页面 (here) 推荐使用 sudo apt-get install apt-安装 dotnet-sdk-your_version 之前的 transport-https。这不再是必需的,因为(来自包描述):
Description-en: transitional package for https support This is a dummy transitional package - https support has been moved into the apt package in 1.5. It can be safely removed.
所以请跳过这个。