微软官网上有相关的配置:
https://github.com/dotnet/core/blob/master/release-notes/download-archives/2.0.0-download.md
Ubuntu 16.04 配置总结如下:
方法一:自动安装
Ubuntu 16.04 and Linux Mint 18
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
然后更新安装:Then, update the package cache and install .NET Core
sudo apt-get update
sudo apt-get install dotnet-sdk-2.0.0
方法二:下载安装包手动安装
Installation from a binary archive
Installing from the packages detailed above is recommended and you can also install from binary archive. When using binary archives to install, the contents must be extracted to a user location such as $HOME/dotnet
and a symbolic link created for dotnet
. This is a change from previous versions of .NET Core. Additional details can be seen in .NET Core 2.0 Known Issues.
mkdir -p $HOME/dotnet && tar zxf dotnet.tar.gz -C $HOME/dotnet
export PATH=$PATH:$HOME/dotnet