-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Couldn't find a valid ICU package installed on the system? #2186
Comments
Looks like this documented problem based on quick internet search: https://github.com/dotnet/core/blob/master/Documentation/build-and-install-rhel6-prerequisites.md#troubleshooting |
How can the article you quoted be relevant to running .NET Core 2.2 in a Docker container using the Microsoft provided base image? Shouldn't the Docker image run with all the dependencies included on the Docker host? As I understand the above article is relevant for installing directly on the OS. |
Does the Docket image contain the libraries referenced in the article? Given that Docker images try to be as small as possible (esp. --slim variants - see Docker repo), I wouldn't be surprised if that's the case ... |
I have been running .NET Core application in Docker images over the past 12 months without this kind of problems. Why should it surface out of the blue? |
The image runs fine one another Raspberry PI 3 (using the OS image and components), so I suspect that something have went wrong with the platform the Docker image runs on. |
I was about to suggest that I can see 4 possible reasons:
Looks like you narrowed it down to option 1. |
I have just experienced this issue when trying to run a self contained dotnet core application on CoreOS Container Linux, without a Docker container. E.g. dotnet publish -c Release -o out -r linux-x64
tar -xcvzf out.gz ./out
scp ...
extract ...
run binary For me this means that self contained publish output still has some dependencies which might need clarification. |
Same issue here. Deployed self contained application into google/cloud-sdk:slim. |
My workaround was to edit the generated runtimeconfig.json after following this documentation {
"runtimeOptions": {
"configProperties": {
"System.Globalization.Invariant": true
},
}
} |
This solved my problem. Instead of modifying the generated runtimeconfig.json, I created a runtimeconfig.template.json in the project folder which is used automatically by
|
A bit late but I tried my first Linux console application using the Linux subsystem for Windows. Using Debian, Ubuntu and Arch Linux, I discovered that one of these had exactly the same issue! Adding configProperties made it work for all three! Thanks! |
I can also confirm that the runtimeconfig.template.json when compiling fixes the problem. But it ain't Ideal. I ran unto above mentioned problem while creating my own alpine docker container. |
When running on Linux, ICU is used to get the time zone display name. In Invariant Mode, the standard time zone names are returned instead. It appears that CentOS 7 is not including "libicu" as well which is required to run dotnetcore. |
Derviş Kayımbaşıoğlu's solution is also working. |
I had the same issue on Ubuntu 20.04. This trick worked for me:
Tip from here. |
When trying to run the dotnet sample the following error happened: ``` 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. ``` By adding this file, the configuration flag mentioned in the error message is set to true, and the sample works again. [1] [1] dotnet/core#2186 (comment)
When trying to run the dotnet sample the following error happened: ``` 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. ``` By adding this file, the configuration flag mentioned in the error message is set to true, and the sample works again. [1] [1] dotnet/core#2186 (comment)
When trying to run the dotnet sample the following error happened: ``` 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. ``` By adding this file, the configuration flag mentioned in the error message is set to true, and the sample works again. [1] [1] dotnet/core#2186 (comment)
adding |
My .net core 3.1 Console app is doing Console.WriteLine("HI") and gave me this error in a windows container. Such a basic thing like Console.WriteLine("") should always work with some defaults if necessary! |
I had the same problem on
|
It looks like, since Ubuntu 20.04, I see two workarounds:
-- -- consider documentation that exists today: |
Fix the error discovered in c2f034b Work around the issue described at dotnet/core#2186 and https://github.com/dotnet/core/issues/5019 Integrate the fix shared by @petrsvihlik at dotnet/core#2186 (comment)
Fix the `ICU package` error discovered in c2f034b Work around the issue described at dotnet/core#2186 and https://github.com/dotnet/core/issues/5019 Integrate the fix shared by @petrsvihlik at dotnet/core#2186 (comment)
What sorted this error out for me on CentOS 7 was running the following command |
You make my day. This but suddenly occurred at Gentoo Linux after icu update. |
To be noted: with |
Do we have any solution to pack ICU library as a part of the self contained .NET package? For me setting invariant culture is not an option, while not all libraries support it. |
I was having a similar issue when trying to build my .net 8 project in a Jenkins docker container, what I ended up doing was creating an image and and running the following command
You could try it in your Dockerfile? |
I have been running a .NET Core 2.2 application in a Docker container fine on Raspberry PI 3 (using Raspbian Stretch Lite November 2018) with no problems for several weeks.
But, today when trying to run a newly built container I get:
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.CultureInfo..cctor()
at System.StringComparer..cctor()
at System.AppDomain.InitializeCompatibilityFlags()
at System.AppDomain.CreateAppDomainManager()
at System.AppDomain.Setup(System.Object)
This is my Dockerfile:
FROM microsoft/dotnet:2.2-runtime-stretch-slim-arm32v7
WORKDIR /app
COPY bin/Debug/netcoreapp2.2/linux-arm/publish .
ENTRYPOINT ["dotnet", "NesoyaController.dll"]
The text was updated successfully, but these errors were encountered: