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

After updating Fedora 33 to 34 and dotnet 5.0.5 to 5.0.6 I get error regarding libhostfxr.so #17570

Closed
ac10n opened this issue May 12, 2021 · 13 comments
Assignees
Labels
untriaged Request triage from a team member

Comments

@ac10n
Copy link

ac10n commented May 12, 2021

When running dotnet ef migrations add MigrationName I get:

A fatal error occurred. The required library libhostfxr.so could not be found.
If this is a self-contained application, that library should exist in [/home/alireza/.dotnet/tools/.store/dotnet-ef/5.0.6/dotnet-ef/5.0.6/tools/netcoreapp3.1/any/].
If this is a framework-dependent application, install the runtime in the global location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet/install_location].

The .NET runtime can be found at:
  - https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=fedora.34-x64&apphost_version=5.0.6

Unfortunately, I don't know if the error occurred after updating Fedora to 34 or only after upgrading dotnet to 5.0.6.

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label May 12, 2021
@ac10n
Copy link
Author

ac10n commented May 12, 2021

I tried sudo dnf remove dotnet-sdk-5.0 and the sudo dnf install dotnet-sdk-5.0 now I get:

dotnet --info
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '5.0.6' was not found.
  - No frameworks were found.

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=5.0.6&arch=x64&rid=fedora.34-x64

Host (useful for support):
  Version: 5.0.6
  Commit:  478b2f8c0e

.NET SDKs installed:
  5.0.203 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  No runtimes were found.

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

When I sudo dnf install dotnet-runtime-5.0 or sudo dnf install aspnetcore-runtime-5.0, I get:

Last metadata expiration check: 0:16:47 ago on Wed 12 May 2021 01:53:29 PM +08.
Package dotnet-runtime-5.0-5.0.5-1.fc34.x86_64 is already installed.
Dependencies resolved.

 Problem: package dotnet-runtime-5.0-5.0.6-1.x86_64 requires dotnet-runtime-deps-5.0 >= 5.0.6, but none of the providers can be installed
  - cannot install the best candidate for the job
  - nothing provides compat-openssl10 needed by dotnet-runtime-deps-5.0-5.0.6-1.x86_64
================================================================================
 Package                  Arch    Version    Repository                    Size
================================================================================
Skipping packages with broken dependencies:
 dotnet-runtime-5.0       x86_64  5.0.6-1    packages-microsoft-com-prod   29 M
 dotnet-runtime-deps-5.0  x86_64  5.0.6-1    packages-microsoft-com-prod  2.8 k

Transaction Summary
================================================================================
Skip  2 Packages

Nothing to do.
Complete!

@dagood
Copy link
Member

dagood commented May 12, 2021

The original issue looks to me like an instance of dotnet/docs#18347 / dotnet/runtime#47500: ending up with mixed packages from the Fedora distro and packages.microsoft.com. They install to different locations, so components can't find each other. Version numbering differences can make this pop up suddenly after an upgrade.

For the second issue, it looks like the dotnet-runtime-deps-5.0 package on packages.microsoft.com doesn't support Fedora 34.

@NikolaMilosavljevic @MichaelSimons @omajid

@NikolaMilosavljevic
Copy link
Member

For the second issue, it looks like the dotnet-runtime-deps-5.0 package on packages.microsoft.com doesn't support Fedora 34.

@NikolaMilosavljevic @MichaelSimons @omajid

I plan to introduce a new deps package to be used for Fedora 34+. We will end up producing two Fedora.* deps packages going forward. @dagood this seems like an obvious fix - do you see any issues with the approach?

@dagood
Copy link
Member

dagood commented May 12, 2021

That sounds right to me.

Unfortunately though, I believe the dotnet-runtime-deps-5.0 problem is just another issue layered on top of the feed mixing. So, making an updated deps package makes progress, but doesn't go all the way.

IMO docs need to catch up and show how to properly use the Microsoft feed without the conflicts. (And how to uninstall the Microsoft feed to simply use the distro packages, which is generally preferable.)

@NikolaMilosavljevic
Copy link
Member

That sounds right to me.

Unfortunately though, I believe the dotnet-runtime-deps-5.0 problem is just another issue layered on top of the feed mixing. So, making an updated deps package makes progress, but doesn't go all the way.

IMO docs need to catch up and show how to properly use the Microsoft feed without the conflicts. (And how to uninstall the Microsoft feed to simply use the distro packages, which is generally preferable.)

Completely agree on these points. Investing in documentation is imperative short-term until we can enable easier SxS installs from multiple feeds.

@omajid
Copy link
Member

omajid commented May 12, 2021

Hey @AlirezaHaghshenas, did you find a workaround for this? Do you need help?

@ac10n
Copy link
Author

ac10n commented May 12, 2021

@omajid From @dagood 's comment my impression is if I remove packages-microsoft-com-prod from package repos, and then probably remove and install again, I'll be good to go, but I've not tested that yet.

@vishvanathan-k
Copy link

I tried downloading dotnet from fedora updates repo but I can only install the last version (5.0.5) of it and not the recent version

@ac10n
Copy link
Author

ac10n commented May 13, 2021

For anyone having the same issue my problem solved after:

  1. sudo dnf config-manager --set-disabled packages-microsoft-com-prod
  2. sudo dnf remove dotnet-sdk-5.0
  3. sudo dnf check-update --refresh
  4. At this point I happened to get some unrelated updates, including kernel update, installed them and restarted, probably the restart is not important
  5. sudo dnf install dotnet-sdk-5.0

Now my problem is fixed. At this time it installs 5.0.5 and not 5.0.6, but I have no problem with that.

By the way, as we have people from .net platform here, the repo name: packages-microsoft-com-prod is misleading. For instance, before disabling it I was afraid that it can break ms-teams and skype. So I had to check the package list in repo to make sure it only affects dotnet packages. I think that a more restrictive name remove some friction.

@dagood
Copy link
Member

dagood commented May 13, 2021

For instance, before disabling it I was afraid that it can break ms-teams and skype.

This kind of thing can be an issue (although AFAIK not for Teams or Skype in particular). It looks like the Fedora 34 packages.microsoft.com repo doesn't have anything other than .NET at the moment, but for example, the CentOS 8 https://packages.microsoft.com/centos/8/prod/ repo has PowerShell Core, MSSQL, some AAD packages, and other things I don't recognize. Uninstalling the repo would break auto-updates for those.

The doc @omajid is working on at dotnet/docs#24206 has instructions on how to keep the repo installed and just filter out just the .NET packages, to make this situation work. 🎉

@omajid
Copy link
Member

omajid commented May 14, 2021

I tried downloading dotnet from fedora updates repo but I can only install the last version (5.0.5) of it and not the recent version

Yeah, Fedora will be a few days or week behind releases, pretty much always. Fedora likes to keep packages in testing for around 7 days unless a number of users test the update and give it Feedback. This policy applies to all security sensitive packages too, such as Firefox and OpenSSL. Is this a particular problem for your use case?

By the way, as we have people from .net platform here, the repo name: packages-microsoft-com-prod is misleading. For instance, before disabling it I was afraid that it can break ms-teams and skype.

Yeah, I was worried disabling it would break VSCode!

@marcpopMSFT
Copy link
Member

Old bug triage, closing as this references 5.0. Ping if it's still an issue in later .NET versions

@marcpopMSFT marcpopMSFT closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

7 participants