Skip to content
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

Missing ICU package in AppImage #554

Closed
kelvinhammond opened this issue Apr 2, 2024 · 6 comments
Closed

Missing ICU package in AppImage #554

kelvinhammond opened this issue Apr 2, 2024 · 6 comments
Labels
stale Stale issue or inactive for long period of time

Comments

@kelvinhammond
Copy link

On nixos when I run appimage-run ./StabilityMatrix.AppImage I get the following error. I've tried installing the icu packages (all of them) and none of them seem to provide what is needed. Which package ICU package is required for the app image on Linux?

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.MemoryExtensions.ToLowerInvariant(System.ReadOnlySpan`1<Char>, System.Span`1<Char>)
   at System.UriHelper+<>c.<SpanToLowerInvariantString>b__0_0(System.Span`1<Char>, IntPtr)
   at System.String.Create[[System.IntPtr, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Int32, IntPtr, System.Buffers.SpanAction`2<Char,IntPtr>)
   at System.UriHelper.SpanToLowerInvariantString(System.ReadOnlySpan`1<Char>)
   at System.Uri.CheckSchemeSyntax(System.ReadOnlySpan`1<Char>, System.ParsingError ByRef)
   at System.Uri.ParseSchemeCheckImplicitFile(System.String, System.ParsingError ByRef, Flags ByRef, System.UriParser ByRef)
   at System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
   at System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
   at System.Uri..ctor(System.String)
   at StabilityMatrix.Avalonia.Program..cctor()
   at StabilityMatrix.Avalonia.Program.Main(System.String[])

I can get it to run via DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 DOTNET_SYSTEM_GLOBALIZATION_PREDEFINED_CULTURES_ONLY=false appimage-run ./StabilityMatrix.AppImage with the latest version (v2.9.2) though.

However I get this error after closing the model selection on first run,
I selected to install Stable Diffusion Web UI and it failed.

Unpacking resources
Unpacking resources
Download complete!
Error: System.TypeInitializationException: The type initializer for 'Delegates' threw an exception.
 ---> System.DllNotFoundException: Could not load /tmp/stability-matrix/Assets/Python310/lib/libpython3.10.so with flags RTLD_NOW | RTLD_GLOBAL: libcrypt.so.1: cannot open shared object file: No such file or directory
   at Python.Runtime.Platform.PosixLoader.Load(String dllToLoad)
   at Python.Runtime.Runtime.Delegates..cctor()
   --- End of inner exception stack trace ---
   at Python.Runtime.PythonEngine.<>c.<set_PythonHome>b__27_0()
   at Python.Runtime.Runtime.<>c__DisplayClass106_0.<TryUsingDll>b__0()
   at Python.Runtime.Runtime.TryUsingDll[T](Func`1 op)
   at Python.Runtime.Runtime.TryUsingDll(Action op)
   at Python.Runtime.PythonEngine.set_PythonHome(String value)
   at StabilityMatrix.Core.Python.PyRunner.Initialize()
   at StabilityMatrix.Avalonia.Helpers.UnixPrerequisiteHelper.InstallPythonIfNecessary(IProgress`1 progress)
   at StabilityMatrix.Avalonia.Helpers.UnixPrerequisiteHelper.InstallPackageRequirements(List`1 prerequisites, IProgress`1 progress)
   at StabilityMatrix.Core.Models.PackageModification.SetupPrerequisitesStep.ExecuteAsync(IProgress`1 progress)
   at StabilityMatrix.Core.Models.PackageModification.PackageModificationRunner.ExecuteSteps(IReadOnlyList`1 steps)
Copy link

This issue is stale because it has been open 30 days with no activity. Remove the stale label or comment, else this will be closed in 5 days.

@github-actions github-actions bot added the stale Stale issue or inactive for long period of time label Jun 27, 2024
Copy link

github-actions bot commented Jul 2, 2024

This issue was closed because it has been stale for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2024
@nozpheratu
Copy link

@kelvinhammond You need libcrypt under your shared libraries, specifically an older version of libcrypt so you get libcrypt.so.1 under you path. libxcrypt-legacy has that.

Try this nix shell:

{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
  buildInputs = [
    #pkgs.libxcrypt
    pkgs.libxcrypt-legacy
  ];

  shellHook = ''
    export LD_LIBRARY_PATH=${pkgs.libxcrypt-legacy}/lib:$LD_LIBRARY_PATH
    echo "LD_LIBRARY_PATH is set to $LD_LIBRARY_PATH"
  '';
}

@XDM-Inc
Copy link

XDM-Inc commented Dec 29, 2024

libxcrypt-legacy has that.

i had the same issue here in fedora, installing that fixed it! looks like linux devs depreciated libxcrypt too soon it seems, the new replacement is NOT ready and is NOT backwards compatible.

@kelvinhammond
Copy link
Author

kelvinhammond commented Jan 5, 2025

I tried libxcrypt-legacy and it still didn't work. I get the same icu error.

> wget https://github.com/LykosAI/StabilityMatrix/releases/download/v2.13.0/StabilityMatrix-linux-x64.zip 
> cat shell.nix                 
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
  buildInputs = [
    #pkgs.libxcrypt
    pkgs.libxcrypt-legacy
    pkgs.icu
  ];

  shellHook = ''
    export LD_LIBRARY_PATH=${pkgs.libxcrypt-legacy}/lib:$LD_LIBRARY_PATH
    echo "LD_LIBRARY_PATH is set to $LD_LIBRARY_PATH"
  '';
}
> ls
shell.nix  StabilityMatrix.AppImage  StabilityMatrix-linux-x64.zip
> nix-shell                              
LD_LIBRARY_PATH is set to /nix/store/5j9m3z3c6hygjx34xr1bzrkk8srvcs8a-libxcrypt-4.4.36/lib:

> > appimage-run ./StabilityMatrix.AppImage
StabilityMatrix.AppImage installed in MYHOME/.cache/appimage-run/c6d143a55ad9eb5a813fec537d281afe7a03908216838ecbe8b892c78089c6fb                                     
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 confi
guration 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.Runtime.CompilerServices.StackCrawlMarkHandle, System.String, System.Runtime.CompilerServices.ObjectHandleOnStack, System.String)
   at System.Environment.FailFast(System.Threading.StackCrawlMark ByRef, System.String, System.Exception, System.String)
   at System.Environment.FailFast(System.String)                                                                                                                                                
   at System.Globalization.GlobalizationMode+Settings..cctor()                                                                                                                                  
   at System.MemoryExtensions.ToLowerInvariant(System.ReadOnlySpan`1<Char>, System.Span`1<Char>)                                                           
   at System.UriHelper+<>c.<SpanToLowerInvariantString>b__0_0(System.Span`1<Char>, System.ReadOnlySpan`1<Char>)
   at System.String.Create[[System.ReadOnlySpan`1[[System.Char, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=9.0
.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Int32, System.ReadOnlySpan`1<Char>, System.Buffers.SpanAction`2<Char,System.ReadOnlySpan`1<Char>>)
   at System.UriHelper.SpanToLowerInvariantString(System.ReadOnlySpan`1<Char>)  
   at System.Uri.CheckSchemeSyntax(System.ReadOnlySpan`1<Char>, System.ParsingError ByRef)                                                                                                      
   at System.Uri.ParseSchemeCheckImplicitFile(System.String, System.ParsingError ByRef, Flags ByRef, System.UriParser ByRef)
   at System.Uri.ParseScheme(System.String, Flags ByRef, System.UriParser ByRef)
   at System.Uri.CreateThis(System.String, Boolean, System.UriKind, System.UriCreationOptions ByRef)
   at System.Uri..ctor(System.String)                                                           
   at StabilityMatrix.Avalonia.Program..cctor()
   at StabilityMatrix.Avalonia.Program.Main(System.String[])

@UnclePsymon
Copy link

I can run it with the shell.nix file, but I still have to do this from the cmd: export DOTNET_SYSTEM_GLOBALIZATION_PREDEFINED_CULTURES_ONLY=false && export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1. There are still a few error messages here and there, but it works for now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issue or inactive for long period of time
Projects
None yet
Development

No branches or pull requests

4 participants