question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ARM32]With .NET 6 Preview1, running application failed with error required library libhostfxr.so could not be found.

See original GitHub issue

Repro steps:

  1. Prepare Ubuntu20.04 or Alpine 3.1.13 container on arm 32
  2. Install .NET 6 Preview1 with arm installer
  3. New a console app and try to run it

Expected Result:

  1. App could be run successfully

Actual Result:

  1. Running app failed with error required library libhostfxr.so could not be found.
root@9873cb4531bb:~/c1# dotnet run
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 [/root/c1/bin/Debug/net6.0/].
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].
Dotnet --info
root@9873cb4531bb:~/mytest# dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.100-preview.1.21106.4
 Commit:    d575ffd0dc

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  20.04
 OS Platform: Linux
 RID:         ubuntu.20.04-arm
 Base Path:   /root/mytest/sdk/6.0.100-preview.1.21106.4/

Host (useful for support):
  Version: 6.0.0-preview.1.21102.12
  Commit:  9b2776d481

.NET SDKs installed:
  6.0.100-preview.1.21106.4 [/root/mytest/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.0-preview.1.21103.6 [/root/mytest/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.0-preview.1.21102.12 [/root/mytest/shared/Microsoft.NETCore.App]

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
agockecommented, Mar 8, 2021

@sbomer Could you take a look? I’m not sure where we found an ARM32 machine last time

0reactions
WenJunJi01commented, Oct 25, 2021

The error still repros with .NET 5.0, so open a new bug to track this issue.
https://github.com/dotnet/sdk/issues/22304#: [ARM32]With .NET 5 SDK installed, running application failed with error required library libhostfxr.so could not be found.

Read more comments on GitHub >

github_iconTop Results From Across the Web

.net - The required library libhostfxr.so could not be found. ...
Solved by adding this in whatever part of shell profile (it can be at the end): # Netcore export PATH=$PATH:$HOME/.dotnet/tools export ...
Read more >
Troubleshoot .NET package mix ups on Linux
These errors may occur when you run the dotnet command. ... A fatal error occurred. The required library libhostfxr.so could not be found....
Read more >
Dotnet-script, libhostfxr.so not found
When I run dotnet-script, I get this error: dotnet-script A fatal error occurred. The required library libhostfxr.so could not be found.
Read more >
802087 – dev-dotnet/dotnet-sdk-bin: A fatal error occurred ...
A fatal error occurred. The required library libhostfxr.so could not be found. If this is a self-contained application, that library should ...
Read more >
Library error while Installing .Net Core
NET Core. Run that script. 2) Run sudo apt-get install dotnet-dev-1.0.0-preview2-003118 . – edwinksl.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found