runtime: Couldn't find a valid ICU package installed on the system.
Problem encountered on https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/run Operating System: linux
I followed https://github.com/dotnet/core/blob/master/Documentation/build-and-install-rhel6-prerequisites.md#troubleshooting to install the package and change library path. But still doesn’t work.
dotnet run
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.
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.String.ToLowerInvariant()
at System.Text.EncodingHelper.GetCharset()
at System.Text.EncodingHelper.GetEncodingFromCharset()
at System.ConsolePal.GetConsoleEncoding()
at System.Console+<>c.<get_OutputEncoding>b__19_0()
at System.Threading.LazyInitializer.EnsureInitializedCore[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon ByRef, System.Object ByRef, System.Func`1<System.__Canon>)
at System.Threading.LazyInitializer.EnsureInitialized[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon ByRef, System.Object ByRef, System.Func`1<System.__Canon>)
at System.Console.get_OutputEncoding()
at System.Console.CreateOutputWriter(System.IO.Stream)
at System.Console+<>c.<get_Out>b__26_0()
at System.Threading.LazyInitializer.EnsureInitializedCore[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon ByRef, System.Object ByRef, System.Func`1<System.__Canon>)
at System.Threading.LazyInitializer.EnsureInitialized[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon ByRef, System.Object ByRef, System.Func`1<System.__Canon>)
at System.Console.get_Out()
at System.Console.WriteLine(System.String)
at myApp.Program.Main(System.String[])
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 17 (14 by maintainers)
Links to this issue
Commits related to this issue
- Fix dependency discovered on Ubuntu 20 🐛🧹 Fix the error discovered in https://github.com/elm-fullstack/elm-fullstack/commit/c2f034b216e3a73bb8f5fcb9820bd5237055e40c Work around the issue described... — committed to elm-time/elm-time by Viir 3 years ago
- Fix dependency on `ICU package` discovered on Ubuntu 20 🐛🧹 Fix the `ICU package` error discovered in https://github.com/elm-fullstack/elm-fullstack/commit/c2f034b216e3a73bb8f5fcb9820bd5237055e40c ... — committed to elm-time/elm-time by Viir 3 years ago
I had something similar happen to me on Archlinux, when the icu package was recently updated: https://github.com/archlinux/svntogit-packages/tree/36f4025b3bb8b0832b7ad452afe6bd605e894158/trunk
I did something like:
export CLR_ICU_VERSION_OVERRIDE=$(pacman -Q icu | awk '{split($0,a," ");print a[2]}' | awk '{split($0,a,"-");print a[1]}')
to fix.Thanks for the tip!
I got an installation working with the ICU working after noticing that reply and prior discussions. I thought at first read what was referred to was compilation from source but this is not and much simpler a process, so may be worth expanding here. This refers to the Manual Install option.
Steps:
Downloading the “Binaries” tarball for the SDK x64 of .NET core 3.1
tar zxf dotnet-sdk-3.1.402-linux-x64.tar.gz -C "$HOME/dotnet"
nano ~/.bashrc
then addingAll seem to work well this way,
dotnet run
or direct binary invocation. I am actually unclear as to exactly why the ‘missing ICU’ goes away installing this way, but will take it as is.Hi @qyangaa
If your RHEL icu version is 50.2, it is able to run
yum info icu
for double check the version.We met the similar issue when porting to MIPS64. Fixed in 5.0.0.
Thanks, Leslie Zhai
This work for me! THX!!! But this has to be done before each call to the ICU. It feels like it’s being overwritten by something.
@qyangaa @jmp75 could you please follow the issue https://github.com/dotnet/runtime/issues/43052 which is tracking fixing same issue (I guess)?