I am trying to run my AspNetCore 2 application on a Raspberry Pi3 Model B that runs CentOS arm edition (CentOS-Userland-7-armv7hl-Minimal-1708-RaspberryPi3). I installed both libunwind and libicu-devel with yum install
, but when trying to run my application, I always get the following error:
[root@centos-rpi3 ~]# /opt/dotnet/dotnet my.dll
FailFast: Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
at System.Environment.FailFast(System.String)
at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
at System.Globalization.GlobalizationMode..cctor()
at System.Globalization.CultureData.CreateCultureWithInvariantData()
at System.Globalization.CultureData.get_Invariant()
at System.Globalization.CultureData.GetCultureData(System.String, Boolean)
at System.Globalization.CultureInfo.InitializeFromName(System.String, Boolean)
at System.Globalization.CultureInfo.Init()
at System.Globalization.CultureInfo..cctor()
at System.Globalization.CultureInfo.get_InvariantCulture()
at System.StringComparer..cctor()
at System.AppDomainSetup.SetCompatibilitySwitches(System.Collections.Generic.IEnumerable`1<System.String>)
at System.AppDomain.PrepareDataForSetup(System.String, System.AppDomainSetup, System.Security.Policy.Evidence, System.Security.Policy.Evidence, IntPtr, System.String, System.String[], System.String[])
Aborted
For dotnet core installation I followed the guide described here (Task: Install the .NET Core Runtime on the Raspberry Pi): https://blogs.msdn.microsoft.com/david/2017/07/20/setting_up_raspian_and_dotnet_core_2_0_on_a_raspberry_pi/
Any ideas why dotnet core throws this error?
NET Core on Raspberry Pi. . NET Core SDK is available on ARM32/ARM64 which is used by Raspberry Pi but many users have reported it's more convenient to cross build (i.e. dotnet publish -r linux-arm ) binaries from desktop as it allows for much faster iteration cycle.
Supported Platform: Windows® (Authoring), Linux® (Execution), and macOS (Execution). This example shows how to create a . NET assembly using the Library Compiler and integrate it into a . NET Core application that can run on Linux or macOS.
I had the same problem. I tried to run a self-contained dotnet core 2.0 app on an Ubuntu core. I got it work when i set the "System.Globalization.Invariant": true.
There is a File called .runtimeconfig.json
In this File you need to put the following in:
{
"runtimeOptions": {
"configProperties": {
"System.Globalization.Invariant": true
}
}
}
Then it should work.
I solved the problem by installing the following two packages (on ubuntu 16.04)
apt-get install libunwind8 icu-devtools
On my CentOs 7 system,i install icu library with this:
sudo yum install libicu
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With