I want to try out the new .net core. I am following instructs at https://www.microsoft.com/net/core, but it is not working.
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.
I am running 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.
Today (May 2016) only Ubuntu 14.04 is supported.
I successfully install it on Ubuntu 15.10 by adding
deb http://security.ubuntu.com/ubuntu trusty-security main
to /etc/apt/sources-list
Once it's done you should do:
apt-get update
apt-get upgrade
and again the command
apt-get install dotnet-dev-1.0.0-preview1-002702a
It will ask to install extra package; you reply yes and you are done!
Test by typing
dotnet --version
Enjoy!
UPDATED
Now .NET core supports ubuntu 16.04.
Please check link for more details
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
September 2018 - .NET Core installation is super simple on Ubuntu:
Register the Microsoft key, product repository, and install required dependencies:
IMPORTANT NOTE: change the 18.04 in the below path to your Ubuntu version (i.e.: 17.10, 16.04 etc.)
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
Now update list of available packages and install your SDK
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1
Done!
Additional info:
For me (end of Sep 2018) it was version 2.1, but you can check for more recent versions like this:
sudo apt-cache search dotnet-sdk
Also please NOTE: Microsoft on their official page (here) recommend use sudo apt-get install apt-transport-https before installing dotnet-sdk-your_version. This is not required anymore because (from package description):
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.
So feel free to skip this.
I am in the same boat. I want to try it without all this installation hassle. I went the docker route and found it much simpler to get up and running. Also, its much easier to clean up after trying it out since all I need to do is remove the container + image.
Another reason I went this route is because I am using Ubuntu 15.10 which is not officially compatible with a .Net Core install for Ubuntu. So instead of upgrading my distro to "try" this out, docker was a better route.
I ran it in an interactive shell, so that I can run my code:
docker run -it --name dotnet -v /home/me/tmp/:/tmp/project microsoft/dotnet /bin/bash
.. then just write some sample code using a text editor in my /home/me/tmp dir and when I want to run it, I just go to the container shell and do dotnet run
.
See:
Trying to install the dependant package dotnet-sharedframework-microsoft.netcore.app will get you next error, saying that this package depends on libicu52 but it is not installable
http://packages.ubuntu.com/pl/trusty/amd64/libicu52/download
and download .deb package. Now, go to the download location and install the package by running:
sudo dpkg -i libicu52_52.1-3ubuntu0.4_amd64.deb
Now, you will be able to run the following commands:
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
Good luck
source: http://zablo.net/blog/post/run-and-debug-asp-net-core-rc2-ubuntu-16-04
I also got same problem. I checked out many solutions. But they didn't work. Finally i discovered i have followed their 'Ubuntu 16.10' instruction instead of 'Ubuntu 16.04'. There was bit difference between them. Make sure you have followed correct instruction.
This package depends on libicu52. You will need to download the .deb package from the following url.
> http://packages.ubuntu.com/pl/trusty/amd64/libicu52/download
Now, install it using the following command.
> sudo dpkg -i libicu52_52.1-3ubuntu0.4_amd64.deb
You can install the .net core with this command.
> apt-get install dotnet-dev-1.0.0-preview1-002702a
Check the version which you have installed.
> dotnet --version
来源:https://stackoverflow.com/questions/37322843/ubuntu-installing-net-core