Ubuntu 18 is listed as supported, but there doesn't seem to be any apt feed or deb package download link for it.
I've tried taking the 17.10 links/feeds and replacing version numbers / os codenames, but they all 404.
Please provide download links/install instructions for Ubuntu 18.
I used (the fifth) way of installing dotnet:
apt update
apt install wget libssl1.0-dev libicu-dev libunwind8
# dotnet core 2.0 rtm
wget https://dotnetcli.azureedge.net/dotnet/Sdk/release/2.0.0/dotnet-sdk-latest-linux-x64.tar.gz
# or dotnet core 2.1 prerelease
wget https://dotnetcli.azureedge.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-x64.tar.gz
mkdir /usr/bin/dotnet
tar -xvzf dotnet-sdk-latest-linux-x64.tar.gz -C /usr/bin/dotnet
export PATH=$PATH:/usr/bin/dotnet
Now you can run dotnet new mvc --name MyWebApp
etc. on Ubuntu bionic-beaver / 18.04.
Ubuntu 18 will be released on April 27 (https://wiki.ubuntu.com/BionicBeaver/ReleaseSchedule) and aiui (from https://github.com/dotnet/corefx/issues/28114#issuecomment-379410199), .NET Core 2.1 final will be a bit earlier.
https://github.com/dotnet/corefx/pull/28919 fixes the build on bionic, that has clang 6 in its default feed (coreclr and core-setup already build).
Caveat:
For runtime dependencies, there is a challenge to satisfy libssl1.0 and libcurl4 co-exist, as bionic's curl is upgraded to depnd on libssl1.1 and corefx does not yet support libssl1.0: https://github.com/dotnet/corefx/issues/9855#issuecomment-379535305 (libssl is required to build corefx as well as run time). I think until openssl1.1 is fully supported in corefx, the right approach would be to build and statically compile libssl1.0 in corefx package.
Which means if you have any software installed that depends on libssl1.1 (cmake, curl etc.), apt-get will prompt you to remove it to be able to install libssl1.0.
IMO, this should be prioritized for 2.1, as 18.04 is going to be the "latest LTS" until 2020..
@trondhindenes out of curiosity: Where did you find Ubuntu 18 listed as supported? Which 17.10 links/feeds did you use and try to adapt?
@kasper3 can you please clarify what you think should be prioritized for 2.1? General Ubuntu 18.04 support? Or something specific?
BTW: I see Ubuntu 18.04 in daily builds of master - would that help?
cc @wfurt @tmds
@karelz, following the steps in previous comment, I can run .NET Core on Ubuntu 18.04 with socket HTTP handler. The conflicting native dependency is libcurl-openssl1.0-dev
, that is used to build CoreFX, as well as when we try to use CurlHttpHandler at runtime (https://github.com/dotnet/corefx/issues/28353). So if we have cmake, curl etc. installed (dev machine) on Ubuntu 18.04, and try to install libcurl-openssl1.0-dev, it conflicts with libssl1.1. @bartonjs suggested https://github.com/dotnet/corefx/issues/9855#issuecomment-379570006 to use apt-get install --nodeps ...
, but --nodeps
switch is not available on Ubuntu/Debian's apt-get. There are tricky workarounds to create isolated silos (containers, jails etc.) to dodge conflicting dependencies, but not a very smooth experience compared to what we have for Ubuntu 16.04 and Ubuntu 14.04 etc.
what you think should be prioritized for 2.1
I realize addressing https://github.com/dotnet/corefx/issues/9855 to support OpenSSL 1.1 is not a practical solution for 2.1, maybe we can start prototyping it right after 2.1 is out? For libcurl, if the plan is to remove CurlHttpHandler in a long run (after HTTP/2 support is added to SockerHttpHandler, for example), then we can remove this dependency for good: https://github.com/dotnet/corefx/issues/28353.
@kasper3 OpenSSL 1.1 support is not practical for 2.1. Security area owners will decide when & how to support it (we have to keep in mind we need to support older distros with OpenSSL 1.0 only as well).
I am a bit confused about mixing CoreFX-dev scenario (building CoreFX) vs. runtime scenario. Can you please separate them?
Do you have concerns about runtime scenario? By default we do not need libcurl, so things should be fine, right?
Users who want to opt-out of SocketsHttpHandler need libcurl installed. If the installed libcurl is not backed by OpenSSL1.0, then some things around certificate callbacks won't work (similar to Mac) - not ideal, but hopefully not blocking too many scenarios.
The last option is to figure out some steps that will allow Ubuntu 18.04 to have both libcurl-openssl1.0-dev and libssl1.1 installed at the same time. I hope that some Ubuntu experts can help with that.
From a clean install of 18.04 beta2, I got to the point where thing were building with
sudo apt-get install git cmake libunwind8 clang zlib1g-dev libcurl4-openssl-dev libkrb5-dev
apt-get download libssl1.0-dev
sudo dpkg-deb -X libssl1.0-dev_1.0.2n-1ubuntu5_amd64.deb /
Not a great story, but it works (as long as you don't independently need the OpenSSL 1.1 headers)
I haven't made it to "finish building and run tests" yet since there are a bunch of new warnings/errors from clang about our existing code.
warnings/errors from clang about our existing code
PR is ready, pending review https://github.com/dotnet/corefx/pull/28919 :)
@trondhindenes did you get the information you needed?
I assumed that Ubuntu 18 was supported by looking at https://github.com/dotnet/core/blob/master/release-notes/2.0/2.0-supported-os.md. Turns out there was a line missing, which lead me to believe that Ubuntu 18 was a supported OS, while it in fact was Linux Mint 18. This error has been fixed it seems, to the table is correct now.
So, all is good. I'm obviously eagerly awaiting .Net 2.0 support for Ubuntu 18.04, but I totally understand that this version is not on the list of supported OSes yet. I'm fine with closing this issue.
@ianhays @joshfree do we have plans to document Ubuntu 18.04 installation steps somewhere?
This article https://dev.to/carlos487/installing-dotnet-core-in-ubuntu-1804-7lp helped me.
Microsoft now have an official documentation on this. https://www.microsoft.com/net/download/linux-package-manager/rhel/sdk-current
Register Microsoft key and feed
Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.
Open a terminal and run the following commands:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/ubuntu/18.04/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
Install .NET SDK
Update the products available for installation, then install the .NET SDK.
In your terminal, run the following commands:
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1
Great. I think the heavy usage of sudo
in MS official documentation is redundant. Not everyone needs sudo
for each command. It depends on policy and the privileges of the executing user.
I have a proposal, how to write those lines a lot shorter, more unixish and safe:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main"
as I could not find the repo containing that contains the documentation that can be seen here I wanted to at least let the world know.
@madmuffin1 This worked on Ubuntu 18.10
Just following up on this older issue ---
.NET Core 2.1 SDK on Ubuntu 18.04 installation instructions are available https://www.microsoft.com/net/download/linux-package-manager/ubuntu18-04/sdk-current
Also the unix build instructions for working in the dotnet/corefx repo have been updated to support working on 18.04 https://github.com/dotnet/corefx/blob/master/Documentation/building/unix-instructions.md (based on the workaround @bartonjs provided in https://github.com/dotnet/corefx/issues/28924#issuecomment-379889142)
I'm closing out this issue now that the build instructions have been corrected. Please feel to reactivate this issue if the docs referenced above do not meet your needs or if there's anything else Ubuntu 18.04-guidance-related that should be addressed. Thanks!
Most helpful comment
Microsoft now have an official documentation on this. https://www.microsoft.com/net/download/linux-package-manager/rhel/sdk-current
Register Microsoft key and feed
Before installing .NET, you'll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.
Open a terminal and run the following commands:
Install .NET SDK
Update the products available for installation, then install the .NET SDK.
In your terminal, run the following commands: