If you have run a Dotnet Core project or a packaged Dotnet Core binary on Ubuntu and you have run into Process terminated. 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. then you have come to the right place.

Basically this is happening because there is missing dependency for the Unicode and Globalization support.

How To Fix For Binary

You need to install the dependency on the system. If you are on Ubuntu you can do that with:

sudo apt-get install -y libicu-dev

That’s it the application should not stop complaining about the error.

How To Fix For A Dotnet Core Project: Solution 1

If the application has a runtimeconfig.json available then add the following parameters and run again:

{
    "runtimeOptions": {
        "configProperties": {
            "System.Globalization.Invariant": true
        },
    }
}

How To Fix For A Dotnet Core Project: Solution 2

If you are the one packaging the application with dotnet publish you can add the following to/or create a runtimeconfig.template.json inside the project folder:

{
    "configProperties": {
        "System.Globalization.Invariant": true
    }
}

How To Fix For A Dotnet Core csproj: Solution 3

<PropertyGroup>
    <InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>

What does invariant do anyway?

So as from .Net Core 2, this option allows you to remove dependencies on globalization from your application. .Net Core depends on the operating system to provide this information. You can read the following document for the complete reasoning: https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-invariant-mode.md

Hopefully this will resolve the issues! If not the best place would be to check open issues at https://github.com/dotnet/core/issues or stackoverflow.