Docs: Needs an additional step before installing .NET Core SDK

Created on 21 Mar 2020  Â·  13Comments  Â·  Source: dotnet/docs

rpm -ql packages-microsoft-prod.rpm
/etc/yum.repos.d/microsoft-prod.repo
tuttipazzo@cafe:/etc/zypp/repos.d # ls -litra /etc/yum.repos.d/microsoft-prod.repo
6817396 -rw-r--r-- 1 root root 219 Mar 20 16:19 /etc/yum.repos.d/microsoft-prod.repo

_zypper looks for repos in /etc/zypp.repos.d so:_

tuttipazzo@cafe:/etc/zypp/repos.d # zypper se dotnet-runtime
Loading repository data...
Reading installed packages...
**No matching items found.**

_But if we tell zypper where to find the microsoft-prod.repo file:_

tuttipazzo@cafe:**/etc/zypp/repos.d** # sudo ln -s /etc/yum.repos.d/microsoft-prod.repo

tuttipazzo@cafe:/etc/zypp/repos.d # ls -litra microsoft-prod.repo
6818302 lrwxrwxrwx 1 root root 36 Mar 20 16:29 microsoft-prod.repo -> /etc/yum.repos.d/microsoft-prod.repo

_Now we can refresh it:_

tuttipazzo@cafe:/etc/zypp/repos.d # sudo zypper ref -r packages-microsoft-com-prod
Retrieving repository 'packages-microsoft-com-prod' metadata ...............................[done]
Building repository 'packages-microsoft-com-prod' cache ....................................[done]
Specified repositories have been refreshed.

_And operations on pkgs in that repo can be used:_

tuttipazzo@cafe:/etc/zypp/repos.d # zypper se dotnet-runtime
Loading repository data...
Reading installed packages...

S | Name                    | Summary                                                    | Type   
--+-------------------------+------------------------------------------------------------+--------
  | dotnet-runtime-2.1      | Microsoft .NET Core Runtime - 2.1.16 Microsoft.NETCore.App | package
  | dotnet-runtime-2.2      | Microsoft .NET Core Runtime - 2.2.8 Microsoft.NETCore.App  | package
  | dotnet-runtime-3.0      | Microsoft .NET Core Runtime - 3.0.3 Microsoft.NETCore.App  | package
  | dotnet-runtime-3.1      | Microsoft .NET Core Runtime - 3.1.2 Microsoft.NETCore.App  | package
  | dotnet-runtime-deps-2.1 | dotnet-runtime-deps-2.1 2.1.16                             | package
  | dotnet-runtime-deps-2.2 | dotnet-runtime-deps-2.2 2.2.8                              | package
  | dotnet-runtime-deps-3.0 | dotnet-runtime-deps-3.0 3.0.3                              | package
  | dotnet-runtime-deps-3.1 | dotnet-runtime-deps-3.1 3.1.2                              | package

Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Area - .NET Core Guide P1 product-feedback

Most helpful comment

The linux package repo team is now tracking this as a bug but haven't provided an ETA. They've made it clear they don't consider it high priority because this bug has been around a while and we have a workaround. (More info is on our ticket (internal Msft link, sorry): https://icm.ad.msft.net/imp/v3/incidents/details/182039364/home.)

It turns that, after all, we should incorporate this workaround into our doc, since the bug will probably be around for a while.

I think the workaround would be this to make it work from any directory:

sudo rpm -Uvh https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm
sudo ln -s /etc/yum.repos.d/microsoft-prod.repo /etc/zypp/repos.d/microsoft-prod.repo

@tuttipazzo does that look right, if you don't mind taking a look?

@Thraka can you help get this into the doc?

All 13 comments

Moved to original comment

@dagood do you prefer a ping or an assignment when I need you to be pulled in? 😄

At a base level, this would be a bug with packages-microsoft-prod.rpm. These config packages are intended to be specific to a certain distro. I've confirmed that what I get when I download https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm does appear to target \etc\yum.repos.d\.

@tuttipazzo, what version of SLES are you using? Can you please show us cat /etc/os-release?

I'm wondering if you're using a newer version of SLES that we haven't tried this on yet. I would be surprised if this has been a problem so long in SLES 15 and we hadn't seen it until now (although that might be possible I guess).

Either way, I don't think adding another step to the instructions is the right move here. The package should be fixed. We could potentially add a step to the doc as a workaround if it ends up necessary though.

Thanks for the report!

/cc @NikolaMilosavljevic @dleeapho @nakarnam @leecow


I've edited the original post to add code formatting and make it a little easier to parse, hope that's alright @tuttipazzo.


prefer a ping or an assignment

They're the same to me. I'm fine with assignment if it helps keep track of things on your end.

But... @NikolaMilosavljevic actually owns this area now. He might have a different preference.

I have no problem with formatting to make it more readable.

So let's get SLES-specific here. SLES12 is fine:

s12sp5sumaClient4:~ # cat /etc/os-release 
NAME="SLES"
VERSION="12-SP5"
VERSION_ID="12.5"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP5"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp5"

s12sp5sumaClient4:~ # sudo rpm -Uvh https://packages.microsoft.com/config/sles/12/packages-microsoft-prod.rpm
Retrieving https://packages.microsoft.com/config/sles/12/packages-microsoft-prod.rpm
warning: /var/tmp/rpm-tmp.4yKMGJ: Header V4 RSA/SHA256 Signature, key ID be1229cf: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:packages-microsoft-prod-1.0-sle12################################# [100%]

s12sp5sumaClient4:~ # rpm -ql packages-microsoft-prod-1.0-sle12
/etc/pki/rpm-gpg/RPM-GPG-KEY-microsoft-prod
/etc/zypp/repos.d/microsoft-prod.repo

But SLES15 of that pkg is not:

```s12sp5sumaClient4:~ # sudo rpm -Uvh https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm
Retrieving https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm
Preparing... ################################# [100%]
Updating / installing...
1:packages-microsoft-prod-1.0-1 ################################# [100%]

s12sp5sumaClient4:~ # rpm -ql packages-microsoft-prod-1.0
/etc/yum.repos.d/microsoft-prod.repo
```
Fixing the pkg is fine.

NOTE: As far as I know SLE15's zypper has not changed WRT to repos outside of /etc/zypp/repos.d ...

Interesting, thanks for the extra info and digging into it. Definitely looks like a straightforward bug in the package. The packages.microsoft.com team maintains these configuration packages so we'll get them to fix it. (Unfortunately they have no public presence to file at directly.)

OK, for completeness sake, I spun up a sles15.sp1 VM:

sles15sp1:~ # cat /etc/os-release
NAME="SLES"
VERSION="15-SP1"
VERSION_ID="15.1"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP1"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15:sp1"

sles15sp1:~ # rpm -Uvh https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm
Retrieving https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:packages-microsoft-prod-1.0-1    ################################# [100%]

sles15sp1:~ # zypper -n ref
Repository 'SLE-Module-Basesystem15-SP1-Pool' is up to date.                                      
Repository 'SLE-Module-Basesystem15-SP1-Updates' is up to date.                                   
Repository 'SLE-Product-SLES15-SP1-Pool' is up to date.                                           
Repository 'SLE-Product-SLES15-SP1-Updates' is up to date.                                        
Repository 'SLE-Module-Server-Applications15-SP1-Pool' is up to date.                             
Repository 'SLE-Module-Server-Applications15-SP1-Updates' is up to date.                          
All repositories have been refreshed.

sles15sp1:~ # zypper -n se dotnet-runtime
Refreshing service 'Basesystem_Module_15_SP1_x86_64'.
Refreshing service 'SUSE_Linux_Enterprise_Server_15_SP1_x86_64'.
Refreshing service 'Server_Applications_Module_15_SP1_x86_64'.
Loading repository data...
Reading installed packages...
No matching items found.

@NikolaMilosavljevic Should this issue be moved out of docs and into the product repo? Or is there something to doc here?

The product team that owns this feed setup package unfortunately has no public presence. This issue tracks filing an internal issue to get them to fix it. I think it'd be good to keep this feedback issue active so that others hitting this problem can find it from https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-sles15 and see the workaround.

If you want to transfer it for some procedural reason (triage, etc.), https://github.com/dotnet/core is the only place I think makes sense other than here.

The linux package repo team is now tracking this as a bug but haven't provided an ETA. They've made it clear they don't consider it high priority because this bug has been around a while and we have a workaround. (More info is on our ticket (internal Msft link, sorry): https://icm.ad.msft.net/imp/v3/incidents/details/182039364/home.)

It turns that, after all, we should incorporate this workaround into our doc, since the bug will probably be around for a while.

I think the workaround would be this to make it work from any directory:

sudo rpm -Uvh https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm
sudo ln -s /etc/yum.repos.d/microsoft-prod.repo /etc/zypp/repos.d/microsoft-prod.repo

@tuttipazzo does that look right, if you don't mind taking a look?

@Thraka can you help get this into the doc?

@dagood Do you have a quick summery I can base the update on? Just a problem statement would be fine.

Do you mean something like this?

The SLES 15 Microsoft repository setup package installs the microsoft-prod.repo file to the wrong directory, preventing zypper from finding the .NET Core packages. To fix this, create a symlink in the correct directory.

@dagood does this only apply to SLES 15?

Yep. SLES 12 and others don't have this bug.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sime3000 picture sime3000  Â·  3Comments

Eilon picture Eilon  Â·  3Comments

LJ9999 picture LJ9999  Â·  3Comments

sdmaclea picture sdmaclea  Â·  3Comments

garfbradaz picture garfbradaz  Â·  3Comments