Reputation: 1
So here is the dotnet runtime and sdk that I have on my system:
rubber_duck@pop-os:/$ dotnet --info
.NET SDK:
Version: 8.0.405
Commit: fb1830d421
Workload version: 8.0.400-manifests.c7afa696
MSBuild version: 17.11.9+a69bbaaf5
Runtime Environment:
OS Name: pop
OS Version: 22.04
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/8.0.405/
.NET workloads installed:
Configured to use loose manifests when installing new manifests.
There are no installed workloads to display.
Host:
Version: 8.0.12
Architecture: x64
Commit: 89ef51c5d8
.NET SDKs installed:
6.0.428 [/usr/share/dotnet/sdk]
8.0.405 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.12 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.12 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
and I have POP!_OS 22.04 LTS, I used apt to install .NET SDK and runtime.
I wanted to use dotnet-interactive on my system, and I have it installed as a tool:
rubber_duck@pop-os:/$ dotnet tool list --global
Package Id Version Commands
--------------------------------------------------------------------
csharpier 0.30.6 dotnet-csharpier
microsoft.dotnet-interactive 1.0.556801 dotnet-interactive
but the issue is when I try to access dotnet-interactive, it shows:
rubber_duck@pop-os:/$ dotnet-interactive
Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu (or icu-libs) using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. Please see https://aka.ms/dotnet-missing-libicu for more information.
at System.Environment.FailFast(System.String)
at System.Globalization.GlobalizationMode+Settings..cctor()
at System.Globalization.CultureData.CreateCultureWithInvariantData()
at System.Globalization.CultureData.get_Invariant()
at System.Globalization.TextInfo..cctor()
at System.Diagnostics.Tracing.EventSource.GetGuid(System.Type)
at System.Diagnostics.Tracing.EventSource..ctor(System.Diagnostics.Tracing.EventSourceSettings, System.String[])
at System.Diagnostics.DiagnosticSourceEventSource..cctor()
at System.Diagnostics.ActivitySource..ctor(System.String, System.String)
at System.Diagnostics.Activity..cctor()
at System.Diagnostics.Activity..ctor(System.String)
at Pocket.OperationLogger..ctor(System.String, System.String, System.String, System.Func`1<System.ValueTuple`2<System.String,System.Object>[]>, Boolean, System.Object[])
at Pocket.LoggerExtensions.OnEnterAndExit(Pocket.Logger, System.String, System.Func`1<System.ValueTuple`2<System.String,System.Object>[]>, System.Object[])
at Pocket.LoggerExtensions.OnEnterAndExit(Pocket.Logger, System.String, System.Func`1<System.ValueTuple`2<System.String,System.Object>[]>, System.Object)
at Microsoft.DotNet.Interactive.App.CommandLine.CommandLineParser.Create(Microsoft.Extensions.DependencyInjection.IServiceCollection, StartServer, Jupyter, StartKernelHost, StartNotebookParser, StartHttp, System.Action, Microsoft.DotNet.Interactive.Telemetry.TelemetrySender)
at Microsoft.DotNet.Interactive.App.Program+<Main>d__1.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.DotNet.Interactive.App.Program+<Main>d__1, Microsoft.DotNet.Interactive.App, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<Main>d__1 ByRef)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[Microsoft.DotNet.Interactive.App.Program+<Main>d__1, Microsoft.DotNet.Interactive.App, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<Main>d__1 ByRef)
at Microsoft.DotNet.Interactive.App.Program.Main(System.String[])
at Microsoft.DotNet.Interactive.App.Program.<Main>(System.String[])
Aborted (core dumped)
rubber_duck@pop-os:/$
I also created a test file in order to check if .NET runtime is correctly using the ICU libraries on my system and that the basic globalization functions are working.
Here is the file:
// testicu.cs
using System;
using System.Globalization;
public class TestICU
{
public static void Main(string[] args)
{
try
{
CultureInfo.CurrentCulture = new CultureInfo("en-US"); // Or any other culture
Console.WriteLine($"Current Culture: {CultureInfo.CurrentCulture.Name}");
Console.WriteLine("Testing ICU...");
string formattedNumber = string.Format(CultureInfo.CurrentCulture, "{0:C}", 12345.67);
Console.WriteLine(formattedNumber);
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
and here is the output:
rubber_duck@pop-os:~/testicu$ ./testicu
Current Culture: en-US
Testing ICU...
$12,345.67
How to fix this? I mean how do I use dotnet interactive?
I wanted dotnet interactive in order to use C# in jupyter notebook, but dotnet interactive cannot detect libicu files but C# file work and execute properly on my system.
Also i have steam, unity and blender installed, and they have their own libicu files as well(not sure about blender having its own libicu files though)
System variables are all properly configured
Upvotes: 0
Views: 34