Runtime: dotnet-dev-1.0.4 package fails to install on Ubuntu

Created on 10 May 2017  路  20Comments  路  Source: dotnet/runtime

_From @ed-alertedh on May 10, 2017 0:32_

Steps to reproduce

(taken from: https://www.microsoft.com/net/core#linuxubuntu )

sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ yakkety main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
sudo apt-get update
sudo apt-get install dotnet-dev-1.0.4

Expected behavior

dotnet-dev-1.0.4 package installs

Actual behavior

$ sudo apt-get install dotnet-dev-1.0.4
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.4 : Depends: dotnet-sharedframework-microsoft.netcore.app-1.1.2 but it is not installable
E: Unable to correct problems, you have held broken packages.

If I run cat /var/lib/apt/lists/apt-mo.trafficmanager.net_repos_dotnet-release_dists_yakkety_main_binary-amd64_Packages then I can confirm what apt-get is saying. There is no listing for dotnet-sharedframework-microsoft.netcore.app-1.1.2, only for dotnet-sharedframework-microsoft.netcore.app-1.1.1

Workaround

I can install dotnet-dev-1.0.3 successfully.

Environment data

I'm on Ubuntu 17.04 (zesty) but apt-get appears to accept the 16.10 packages. I don't think the issue is caused by the newer version of Ubuntu

dotnet --info output:
N/A

_Copied from original issue: dotnet/cli#6558_

area-Infrastructure-installer area-Setup

Most helpful comment

Still not working here on 16.0.4

sudo apt-get install dotnet-dev-1.0.4
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.4 : Depends: dotnet-sharedframework-microsoft.netcore.app-1.1.2 but it is not going to be installed
Depends: dotnet-sharedframework-microsoft.netcore.app-1.0.5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

All 20 comments

@leecow @dagood It seems like we missed publishing the debian packages to the feed.

@livarcocc @dagood

@ed-alertedh is running 17.04 which is not supported by 1.0 or 1.1. There will be generic Linux binary archives available for 2.0 which should work though I haven't attempted with 17.04 yet.

Confirmed the generic Linux binaries work on 17.04. Have a go with https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-dev-linux-x64.latest.tar.gz.

OK, happy to install via a different method! My main reason for raising this issue is that it appears that this will happen under Ubuntu 16.10 as well, which is the supported version. If I have time I'll confirm in a VM.

It occurred to me that a Docker container would be enough to confirm that this is an issue under 16.10. As suspected, it is! Put this in a Dockerfile:

FROM ubuntu:yakkety

# populate package cache
RUN apt-get update

# these packages are required to install dotnetcore below
RUN apt-get install -y dirmngr apt-transport-https

# dotnetcore install commands
RUN sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ yakkety main" > /etc/apt/sources.list.d/dotnetdev.list'
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
RUN apt-get update
RUN apt-get install -y dotnet-dev-1.0.4

Now run docker build . and you should get the following output at the end:

The following packages have unmet dependencies:
 dotnet-dev-1.0.4 : Depends: dotnet-sharedframework-microsoft.netcore.app-1.1.2 but it is not installable
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c apt-get install -y dotnet-dev-1.0.4' returned a non-zero code: 100

Confirming here as well, same reproduction steps.
sudo apt-get install dotnet-dev-1.0.4 fails with the same error message as @ed-alertedh .
I'm running Ubuntu 16.10 deployed on a brand new Linode VM.

Same here, Ubuntu 16.10.

Same problem on Ubuntu MATE 17.04

Hello world.

Same problem. But if you download and install .NET Core 1.1.2 (Current) here https://www.microsoft.com/net/download/linux and after you install with sudo apt-get install dotnet-dev-1.0.4. it's right great for me.

Best Regards.

@leecow, this appears to be issue related to deb 1.0.4 package push to repo feed. PTAL .

I think I see what happened with the yakkety feed. Working on it ...

Feed for 16.10 has been fixed. sudo apt-get update && sudo apt-get install dotnet-dev-1.0.4 should behave now.

Note again that for 17.04 you need to use the 'generic' Linux binary archive.

@leecow which version of generic Linux binary is that, based on 1.0.4 or an older release? Thanks

@wax911 The generic Linux binaries are a new addition for 2.0.

Same issue, i use 16.04 ubuntu version.

16.0.4 packages should be available and I just verified.

[leecow at lbc-mint in sources.list.d] 
$cat dotnetdev.list 
deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main
[leecow at lbc-mint in sources.list.d] 
$sudo apt-get install dotnet-dev-1.0.4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  dotnet-host dotnet-hostfxr-1.0.1 dotnet-hostfxr-1.1.0 dotnet-sharedframework-microsoft.netcore.app-1.0.5
  dotnet-sharedframework-microsoft.netcore.app-1.1.2
The following NEW packages will be installed:
  dotnet-dev-1.0.4 dotnet-host dotnet-hostfxr-1.0.1 dotnet-hostfxr-1.1.0
  dotnet-sharedframework-microsoft.netcore.app-1.0.5 dotnet-sharedframework-microsoft.netcore.app-1.1.2
0 upgraded, 6 newly installed, 0 to remove and 419 not upgraded.
Need to get 0 B/97.3 MB of archives.
After this operation, 280 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

Still not working here on 16.0.4

sudo apt-get install dotnet-dev-1.0.4
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.4 : Depends: dotnet-sharedframework-microsoft.netcore.app-1.1.2 but it is not going to be installed
Depends: dotnet-sharedframework-microsoft.netcore.app-1.0.5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

@Yzord you may have something else causing the issue. Either that or it's been fixed since you posted.

Worked fine for me using this Dockerfile:

FROM ubuntu:xenial

# populate package cache
RUN apt-get update

# these packages are required to install dotnetcore below
RUN apt-get install -y dirmngr apt-transport-https

# dotnetcore install commands
RUN sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
RUN apt-get update
RUN apt-get install -y dotnet-dev-1.0.4

I was having the same issue using the install instructions on https://www.microsoft.com/net/core#linuxubuntu

There is still a reference to yakkety in the instructions for Ubuntu 16.10. Once I read this thread and changed it to xenial, everything installed correctly.

sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ yakkety main" > /etc/apt/sources.list.d/dotnetdev.list'

should be

sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'

For Ubuntu 17.04 you can use the files @leecow linked along with the Debian instructions to install it.

sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
sudo ln -s /opt/dotnet/dotnet /usr/local/bin

Thanks for linking the files ^^

Was this page helpful?
0 / 5 - 0 ratings

Related issues

omariom picture omariom  路  3Comments

jamesqo picture jamesqo  路  3Comments

chunseoklee picture chunseoklee  路  3Comments

btecu picture btecu  路  3Comments

GitAntoinee picture GitAntoinee  路  3Comments