I get this upon running almost any command
➜ ~ dotnet --info
Unhandled exception. System.TypeInitializationException: The type initializer for 'Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment' threw an exception.
---> System.Runtime.InteropServices.ExternalException (0x80004005): External component has thrown an exception.
at System.Globalization.CompareInfo.SortHandleCache.GetCachedSortHandle(String sortName)
at System.Globalization.CompareInfo.InitSort(CultureInfo culture)
at System.Globalization.CultureInfo.get_CompareInfo()
at System.Globalization.TextInfo.PopulateIsAsciiCasingSameAsInvariant()
at System.Globalization.TextInfo.ChangeCaseCommon[TConversion](String source)
at System.Globalization.TextInfo.ToLower(String str)
at System.String.ToLowerInvariant()
at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetArch()
at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment..cctor()
--- End of inner exception stack trace ---
at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier()
at Microsoft.DotNet.Cli.MulticoreJitProfilePathCalculator.CalculateProfileRootPath()
at Microsoft.DotNet.Cli.MulticoreJitActivator.StartCliProfileOptimization()
at Microsoft.DotNet.Cli.MulticoreJitActivator.TryActivateMulticoreJit()
at Microsoft.DotNet.Cli.Program.Main(String[] args)
[1] 7090 abort dotnet --info
➜ ~ dotnet --list-sdks
3.1.403 [/usr/share/dotnet/sdk]
➜ ~ dotnet --list-runtimes
Microsoft.AspNetCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
➜ ~ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Debian 10, x64
This did work before, with 2.1.22.
Not sure how to proceed to debug this. I'd like to resolve this on my current system without reinstalling. Running this on vagrant/docker/new vm seems to work just fine.
Tagging subscribers to this area: @tarekgh, @safern, @krwq
See info in area-owners.md if you want to be subscribed.
Thanks @krisfremen -- could you please run geticu on the console and paste the output here?
Hi @safern, it seems to be not valid. Does this belong to particular package?
➜ ~ geticu
zsh: command not found: geticu
@krisfremen yes, ICU package, I think if you install it it will start working. How did you get dotnet? Did you install it with package manager or used the tarball? @tarekgh do we always require ICU or do we have a mode where we fallback to some behavior if it's not available? If we require it and you used a package manager then I think we should file an issue to make sure package has a dependency on ICU
@krwq for Unix we always require ICU to be installed... yeah it seems like your missing installing ICU, if you had it the command I shared would've worked.
@safern @krwq
libicu63 is installed, looking over the strace, dotnet seems to be loading it when running.
Tried also installing unicode-cldr-core but it didn't make a difference.
I installed using https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian and this was the case for the earlier versions which worked fine before, but now even installing the older versions seems to be ending up with the same issue.
I was able to get it to run by export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 but I have a feeling this isn't a great approach.
@safern @krwq thanks! your ICU direction gave me something to look into!
# icuinfo
<icuSystemParams type="icu4c">
<param name="copyright"> Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html </param>
<param name="product">icu4c</param>
<param name="product.full">International Components for Unicode for C/C++</param>
<param name="version">63.1</param>
<param name="version.unicode">11.0</param>
<param name="platform.number">4000</param>
<param name="platform.type">Linux</param>
<param name="locale.default">en_US</param>
<param name="locale.default.bcp47">en-US</param>
<param name="converter.default">UTF-8</param>
<param name="icudata.name">icudt63l</param>
<param name="icudata.path"></param>
<!-- n="cldr.version" ERROR: U_MISSING_RESOURCE_ERROR -->
<!-- n="tz.version" ERROR: U_MISSING_RESOURCE_ERROR -->
<param name="tz.default">Etc/UTC</param>
<param name="cpu.bits">64</param>
<param name="cpu.big_endian">0</param>
<param name="os.wchar_width">4</param>
<param name="os.charset_family">0</param>
<param name="os.host">x86_64-pc-linux-gnu</param>
<param name="build.build">x86_64-pc-linux-gnu</param>
<param name="build.cc">gcc</param>
<param name="build.cxx">g++</param>
<param name="uconfig.internal_digitlist">1</param>
<param name="uconfig.have_parseallinput">1</param>
</icuSystemParams>
ICU Initialization returned: U_INVALID_FORMAT_ERROR
Plugins are disabled.
Upon further digging around, I was able to figure out that a file was corrupted and reinstalled libicu63 and libicu-dev.
➜ ~ icuinfo
<icuSystemParams type="icu4c">
<param name="copyright"> Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html </param>
<param name="product">icu4c</param>
<param name="product.full">International Components for Unicode for C/C++</param>
<param name="version">63.1</param>
<param name="version.unicode">11.0</param>
<param name="platform.number">4000</param>
<param name="platform.type">Linux</param>
<param name="locale.default">en_US</param>
<param name="locale.default.bcp47">en-US</param>
<param name="converter.default">UTF-8</param>
<param name="icudata.name">icudt63l</param>
<param name="icudata.path"></param>
<param name="cldr.version">34.0</param>
<param name="tz.version">2018e</param>
<param name="tz.default">Etc/UTC</param>
<param name="cpu.bits">64</param>
<param name="cpu.big_endian">0</param>
<param name="os.wchar_width">4</param>
<param name="os.charset_family">0</param>
<param name="os.host">x86_64-pc-linux-gnu</param>
<param name="build.build">x86_64-pc-linux-gnu</param>
<param name="build.cc">gcc</param>
<param name="build.cxx">g++</param>
<param name="uconfig.internal_digitlist">1</param>
<param name="uconfig.have_parseallinput">1</param>
</icuSystemParams>
ICU Initialization returned: U_ZERO_ERROR
Plugins are disabled.
➜ ~ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.1.403
Commit: 9e895200cd
Runtime Environment:
OS Name: debian
OS Version: 10
OS Platform: Linux
RID: debian.10-x64
Base Path: /usr/share/dotnet/sdk/3.1.403/
Host (useful for support):
Version: 3.1.9
Commit: 774fc3d6a9
.NET Core SDKs installed:
3.1.403 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Success!
I'm glad you sorted it out! Please do reach out if you hit any other errors!
Most helpful comment
@safern @krwq thanks! your ICU direction gave me something to look into!
Upon further digging around, I was able to figure out that a file was corrupted and reinstalled
libicu63andlibicu-dev.Success!