Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install dotnet-sdk-2.1 on Ubuntu 18.04.1 #1822

Closed
JerryBian opened this issue Jul 28, 2018 · 26 comments

Comments

@JerryBian
Copy link

commented Jul 28, 2018

fail to install latest dotnet-sdk on Ubuntu 18.04.1

I just tried to install latest dotnet SDK 2.1 on fresh clean Ubuntu 18.04.1, well, it fails and I didn't find solution yet.

Details

I followed the official tutorial https://www.microsoft.com/net/learn/get-started-with-dotnet-tutorial, under Ubuntu 18.04 section.

jietu20180728-104449

jietu20180728-104725

Any idea?

@mateti

This comment has been minimized.

Copy link

commented Jul 29, 2018

I'm getting this error on 18.04.1:

ngadmin@pocvm4:/tmp$ sudo dpkg -i packages-microsoft-prod.deb
[sudo] password for ngadmin:
(Reading database ... 208777 files and directories currently installed.)
Preparing to unpack packages-microsoft-prod.deb ...
Unpacking packages-microsoft-prod (1.0-ubuntu18.04.1) over (1.0-ubuntu18.04.1) ...
Setting up packages-microsoft-prod (1.0-ubuntu18.04.1) ...

ngadmin@pocvm4:/tmp$ sudo apt-get install apt-transport-https
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-transport-https is already the newest version (1.6.3).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
ngadmin@pocvm4:/tmp$ sudo apt-get install apt-transport-https
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-transport-https is already the newest version (1.6.3).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

ngadmin@pocvm4:/tmp$ sudo apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:5 http://ppa.launchpad.net/nginx/stable/ubuntu bionic InRelease
Reading package lists... Done

ngadmin@pocvm4:/tmp$ sudo apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://ppa.launchpad.net/nginx/stable/ubuntu bionic InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done

ngadmin@pocvm4:/tmp$ sudo apt-get install aspnetcore-runtime-2.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package aspnetcore-runtime-2.1
E: Couldn't find any package by glob 'aspnetcore-runtime-2.1'
E: Couldn't find any package by regex 'aspnetcore-runtime-2.1'

@leecow

This comment has been minimized.

Copy link
Member

commented Jul 30, 2018

Hm, everything is definitely on the repo and working. From a quick test ...

leecow@lbc-1804:~$ cat /etc/apt/sources.list.d/microsoft-prod.list 
deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main

leecow@lbc-1804:~$ sudo apt install dotnet-sdk-2.1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  aspnetcore-runtime-2.1 dotnet-host dotnet-hostfxr-2.1 dotnet-runtime-2.1 dotnet-runtime-deps-2.1
  liblttng-ust-ctl4 liblttng-ust0 liburcu6
The following NEW packages will be installed:
  aspnetcore-runtime-2.1 dotnet-host dotnet-hostfxr-2.1 dotnet-runtime-2.1 dotnet-runtime-deps-2.1 dotnet-sdk-2.1
  liblttng-ust-ctl4 liblttng-ust0 liburcu6
0 upgraded, 9 newly installed, 0 to remove and 18 not upgraded.
Need to get 128 MB of archives.
After this operation, 375 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

@mateti - your apt-get update output is suspicious as package.microsoft.com is not listed among the hits.

@JerryBian - do you have any preview versions installed? There was an issue with previous packages getting in the way of dependency resolution. You can check this with apt search dotnet | grep installed

@JerryBian

This comment has been minimized.

Copy link
Author

commented Jul 31, 2018

@leecow thanks for you reply, but it seems something is still wrong.

jerry@ubuntu-server-0:~$ apt search dotnet | grep installed

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

jerry@ubuntu-server-0:~$ cat /etc/apt/sources.list.d/microsoft-prod.list
deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main
jerry@ubuntu-server-0:~$ sudo apt install dotnet-sdk-2.1
[sudo] password for jerry:
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-sdk-2.1 : Depends: dotnet-runtime-2.1 (>= 2.1.2) but it is not going to be installed
                  Depends: aspnetcore-runtime-2.1 (>= 2.1.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

It should not has any previous version installed, since I downloaded latest version of Ubuntu from their portal and then followed your tutorial installing dotnet SDK then, nothing else did.

Do you need anything I check for you besides above?

@rakeshsinghranchi

This comment has been minimized.

Copy link
Member

commented Jul 31, 2018

@JerryBian , can you please try installing dotnet-runtime-deps-2.1 and dotnet-runtime-2.1 package separately and share the log here?

@JerryBian

This comment has been minimized.

Copy link
Author

commented Jul 31, 2018

@rakeshsinghranchi please see following:

jerry@ubuntu-server-0:~$ sudo apt install dotnet-runtime-deps-2.1
[sudo] password for jerry:
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-runtime-deps-2.1 : Depends: liblttng-ust0 but it is not installable
E: Unable to correct problems, you have held broken packages.
jerry@ubuntu-server-0:~$ sudo apt install dontnet-runtime-2.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dontnet-runtime-2.1
E: Couldn't find any package by glob 'dontnet-runtime-2.1'
E: Couldn't find any package by regex 'dontnet-runtime-2.1'
@leecow

This comment has been minimized.

Copy link
Member

commented Jul 31, 2018

This is strange - what happens with apt search liblttng-ust0. My 18.04.1 output is

leecow@lbc-1804:~$ apt search liblttng-ust0
Sorting... Done
Full Text Search... Done
liblttng-ust0/bionic,now 2.10.1-1 amd64 [installed,automatic]
  LTTng 2.0 Userspace Tracer (tracing libraries)
@rakeshsinghranchi

This comment has been minimized.

Copy link
Member

commented Jul 31, 2018

Please share output of the following commands to help further diagnose the issue :
apt-cache policy dotnet-runtime-deps-2.1
apt-cache policy dotnet-runtime-2.1

@JerryBian

This comment has been minimized.

Copy link
Author

commented Jul 31, 2018

@leecow

jerry@ubuntu-server-0:~$ apt search liblttng-ust0
Sorting... Done
Full Text Search... Done

@rakeshsinghranchi

jerry@ubuntu-server-0:~$ apt-cache policy dotnet-runtime-deps-2.1
dotnet-runtime-deps-2.1:
  Installed: (none)
  Candidate: 2.1.2-1
  Version table:
     2.1.2-1 500
        500 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
     2.1.1-1 500
        500 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
     2.1.0-1 500
        500 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
jerry@ubuntu-server-0:~$ apt-cache policy dotnet-runtime-2.1
dotnet-runtime-2.1:
  Installed: (none)
  Candidate: 2.1.2-1
  Version table:
     2.1.2-1 500
        500 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
     2.1.1-1 500
        500 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages
     2.1.0-1 500
        500 https://packages.microsoft.com/ubuntu/18.04/prod bionic/main amd64 Packages

P.S. my Ubuntu is server version, instead of desktop(GUI), though I couldn't see what's difference might be.

@leecow

This comment has been minimized.

Copy link
Member

commented Jul 31, 2018

So the fact that liblttng-us0 is not being presented to you is the problem. Looks like the package is probably in universe amd 64 which I don't see in your apt-get "Get" list. Here's the archive list I have on a pretty clean box with the default ubuntu repos active in /etc/apt/sources.list.

sudo apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]          
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]                   
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [247 kB] 
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [268 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [138 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [31.4 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [53.7 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [153 kB]    
Get:12 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [204 B]
Get:13 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [152 kB]        
Get:14 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [149 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [153 kB]
Get:16 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [263 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:18 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [5,100 B]
Get:19 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [4,448 B]
Fetched 1,867 kB in 1s (1,748 kB/s)                                     
Reading package lists... Done
@JerryBian

This comment has been minimized.

Copy link
Author

commented Aug 1, 2018

Thanks very much, after I enabled universe repository everything is good.

@joshfree

This comment has been minimized.

Copy link
Member

commented Aug 1, 2018

I'm glad this resolved the problem @JerryBian

@leecow should sudo add-apt-repository universe be added to the install instructions (or as a comment) for Ubuntu 18.04?

https://fabianlee.org/2016/09/18/ubuntu-enabling-the-ubuntu-universe-repository/

@joshfree joshfree added the help wanted label Aug 1, 2018

@leecow

This comment has been minimized.

Copy link
Member

commented Aug 1, 2018

@JerryBian, was Universe deliberately removed at some point? Don't think I've ever seen a default setup that didn't already include that.

@joshfree - Possibly as a general comment to the Linux Prereqs and Setup pages?

@JerryBian

This comment has been minimized.

Copy link
Author

commented Aug 1, 2018

@leecow Actually no, I just tried reinstall Ubuntu Server 18.04.1(ubuntu-18.04.1-live-server-amd64 .iso from portal) and I didn't find any step allow me to setup repository or something like that during the installation. After installed successfully, I checked that APT source list, and universe is not there just like before.

@joshfree Exactly, I executed that command before installing dotnet SDK.

@leecow

This comment has been minimized.

Copy link
Member

commented Aug 1, 2018

Thanks for the extra info @JerryBian - we'll note the need to look for this in Server image scenarios.

@alokraj68

This comment has been minimized.

Copy link

commented Oct 5, 2018

Still having same issue.

@dbegg35

This comment has been minimized.

Copy link

commented Oct 18, 2018

I'm having the same issue when trying to update to the current version from dotnet 2.1.302 on Ubuntu 18.04.1. I have "universe" repository added. I tried installing dotnet-runtime-deps-2.1 with the following result:

zphbf3v

From what I can find, libicu55 has been removed from 18.04 and moved to libicu60

@karelz

This comment has been minimized.

Copy link
Member

commented Oct 18, 2018

@bartonjs @wfurt can you help here please? We test Ubuntu 18.04 in our CI, so there should be a way to make it happen ...

@armand1m

This comment has been minimized.

Copy link

commented Oct 28, 2018

I manually downloaded libicu60 from this url https://packages.ubuntu.com/bionic/amd64/libicu60/download

Installed it with dpkg -i libicu60_60etcetc.deb
then ran sudo apt install dotnet-sdk-2.1 and it worked.

@SYNTAXDZ

This comment has been minimized.

Copy link

commented Nov 2, 2018

@JerryBian , can you please try installing dotnet-runtime-deps-2.1 and dotnet-runtime-2.1 package separately and share the log here?
that worked for me, thanks

@jerryno6

This comment has been minimized.

Copy link

commented Nov 3, 2018

thanbks @SYNTAXDZ , follow your suggestion, it said that

dotnet-runtime-deps-2.1 : Depends: libicu55 but it is not installable

after that, I installed libicu55,
sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt-get update
sudo apt-get install libicu55

and then install net core
sudo apt-get install dotnet-sdk-2.1

Now, I had dotnet core running on Ubuntu Server 18.04.1

@thedon-chris

This comment has been minimized.

Copy link

commented Nov 8, 2018

thanbks @SYNTAXDZ , follow your suggestion, it said that

dotnet-runtime-deps-2.1 : Depends: libicu55 but it is not installable

after that, I installed libicu55,
sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt-get update
sudo apt-get install libicu55

and then install net core
sudo apt-get install dotnet-sdk-2.1

Now, I had dotnet core running on Ubuntu Server 18.04.1

This worked for me on Ubuntu Server 18.04.1!

Thanks!

@jerryno6

This comment has been minimized.

Copy link

commented Nov 9, 2018

@thedon-chris : we are discussing this in
dotnet/core-setup#4724 (comment)

I think you should follow this.

@dbegg35

This comment has been minimized.

Copy link

commented Nov 9, 2018

@thedon-chris : we are discussing this in
dotnet/core-setup#4724 (comment)

I think you should follow this.

Thanks for the information in that thread, it helped to resolve my issue. The issue appears to have happened when I upgrade from 16.04 to 18.04. My dotnet core package version was still pointing at Xenial instead of Bionic. I tried completely removing the dotnet core Xenial package and installing the Bionic version but it did not work. I ended up manually editing my /etc/apt/sources.list.d/msprod.list to point at bionic which resolved the issue.

@rakeshsinghranchi

This comment has been minimized.

Copy link
Member

commented Nov 9, 2018

cc @leecow . Thanks @dbegg35 for sharing the reproducible step.

@rakeshsinghranchi

This comment has been minimized.

Copy link
Member

commented Nov 9, 2018

This issue was moved to dotnet/core-setup#4732

@vbondarev

This comment has been minimized.

Copy link

commented Dec 13, 2018

Hello I had the same issue with dotnet-sdk-2.2.
Problem:

Unable to locate package aspnetcore-runtime-2.2
Couldn't find any package by glob 'aspnetcore-runtime-2.2'
Couldn't find any package by regex 'aspnetcore-runtime-2.2'

Solution:
Skip all instructions from https://dotnet.microsoft.com/download/linux-package-manager/ubuntu18-04/sdk-current

cp /etc/apt/sources.list.d/microsoft-prod.list.save /etc/apt/sources.list.d/microsoft-prod.list

sudo add-apt-repository universe
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.2  

The command sudo dpkg -i packages-microsoft-prod.deb is renaming microsoft-prod.list to microsoft-prod.list.save

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.