Reputation: 473
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?
Upvotes: 8
Views: 4716
Reputation: 2551
When running on Linux, ICU is used to get the time zone display name. It appears that CentOS 7 is not including "libicu" as well which is Required To Run dotnetcore.
Possible Solutions:
sudo yum install libicu
as mentioned hereUpvotes: 0
Reputation: 2244
On my CentOs 7 system,i install icu library with this:
sudo yum install libicu
Upvotes: 5
Reputation: 20
this worked for me:
sudo vi /opt/microsoft/powershell/6.1.0/pwsh.runtimeconfig.json
{ "runtimeOptions": { "configProperties": { "System.Globalization.Invariant": true } } }
Upvotes: 0
Reputation: 18447
I solved the problem by installing the following two packages (on ubuntu 16.04)
apt-get install libunwind8 icu-devtools
Upvotes: 7
Reputation: 141
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.
Upvotes: 14