[GH-ISSUE #4533] [BUG]: won't run on nixos #2886

Closed
opened 2026-02-22 18:31:40 -05:00 by yindo · 12 comments
Owner

Originally created by @flooryyyy on GitHub (Oct 13, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4533

How are you running AnythingLLM?

Desktop AppImage

What happened?

i remember trying anythingllm in the past, but i had the 'Prisma' error and i didn't wanna fondle too much just to fix the issue so I gave up and moved on, but the project has had quite a few improvements and after trying out other projects, I came back to this.

holy yapper okay the issue is that before, the AppImage would at least actually launch and show me a GUI, but currently, all I get is:

❯ appimage-run /mnt/chonky/dotfiles/appimages/anythingllm-desktop
anythingllm-desktop installed in /home/floory/.cache/appimage-run/402c7c12e62456effc892827026435c58d2c398e401a1c9bedfbb65b5a9dcf76
[Preferences] preference config stored at /home/floory/.config/anythingllm-desktop/config.json
Setting Prisma Client output directory to production build. {
  clientOutputPath: '/home/floory/.config/anythingllm-desktop/storage/.prisma/client'
}
[PrismaHelper] Pulling query_engine for linux-nixos from remote. {
  remote: 'https://binaries.prisma.sh/all_commits/61e140623197a131c2a6189271ffee05a7aa9a59/linux-nixos/libquery_engine.so.node.gz'
}
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 27150    0 27150    0     0   399k      0 --:--:-- --:--:-- --:--:--  401k

gzip: /home/floory/.config/anythingllm-desktop/storage/.prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59/libquery_engine-linux-nixos.so.node.gz: not in gzip format
(node:84726) UnhandledPromiseRejectionWarning: Error: Command failed: gunzip /home/floory/.config/anythingllm-desktop/storage/.prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59/libquery_engine-linux-nixos.so.node.gz

gzip: /home/floory/.config/anythingllm-desktop/storage/.prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59/libquery_engine-linux-nixos.so.node.gz: not in gzip format

    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at checkExecSyncError (node:child_process:906:11)
    at Object.execSync (node:child_process:978:15)
    at Object.execSync (node:electron/js2c/node_init:2:16318)
    at e_ (/home/floory/.cache/appimage-run/402c7c12e62456effc892827026435c58d2c398e401a1c9bedfbb65b5a9dcf76/resources/app.asar/dist-electron/main/index.js:15:82054)
    at async /home/floory/.cache/appimage-run/402c7c12e62456effc892827026435c58d2c398e401a1c9bedfbb65b5a9dcf76/resources/app.asar/dist-electron/main/index.js:15:95254
    at async D_ (/home/floory/.cache/appimage-run/402c7c12e62456effc892827026435c58d2c398e401a1c9bedfbb65b5a9dcf76/resources/app.asar/dist-electron/main/index.js:15:94340)
(Use `anythingllm-desktop --trace-warnings ...` to show where the warning was created)
(node:84726) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

but I'm sure that even if this gets resolved, there's still the issue of 'Prisma', which I get even if I add 'prisma' and 'prisma-engines' to my nixpkgs.

let me know if any more information is required as i really would love it if anythingllm functioned on nixos, it looks like an amazing project 😀

Are there known steps to reproduce?

curl -L https://cdn.anythingllm.com/latest/AnythingLLMDesktop.AppImage -o anythingllm-desktop
chmod +x anythingllm-desktop
appimage-run ./anythingllm-desktop

which results in the output above

Originally created by @flooryyyy on GitHub (Oct 13, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4533 ### How are you running AnythingLLM? Desktop AppImage ### What happened? i remember trying anythingllm in the past, but i had the 'Prisma' error and i didn't wanna fondle too much just to fix the issue so I gave up and moved on, but the project has had quite a few improvements and after trying out other projects, I came back to this. holy yapper okay the issue is that before, the AppImage would at least actually launch and show me a GUI, but currently, all I get is: ```bash ❯ appimage-run /mnt/chonky/dotfiles/appimages/anythingllm-desktop anythingllm-desktop installed in /home/floory/.cache/appimage-run/402c7c12e62456effc892827026435c58d2c398e401a1c9bedfbb65b5a9dcf76 [Preferences] preference config stored at /home/floory/.config/anythingllm-desktop/config.json Setting Prisma Client output directory to production build. { clientOutputPath: '/home/floory/.config/anythingllm-desktop/storage/.prisma/client' } [PrismaHelper] Pulling query_engine for linux-nixos from remote. { remote: 'https://binaries.prisma.sh/all_commits/61e140623197a131c2a6189271ffee05a7aa9a59/linux-nixos/libquery_engine.so.node.gz' } % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 27150 0 27150 0 0 399k 0 --:--:-- --:--:-- --:--:-- 401k gzip: /home/floory/.config/anythingllm-desktop/storage/.prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59/libquery_engine-linux-nixos.so.node.gz: not in gzip format (node:84726) UnhandledPromiseRejectionWarning: Error: Command failed: gunzip /home/floory/.config/anythingllm-desktop/storage/.prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59/libquery_engine-linux-nixos.so.node.gz gzip: /home/floory/.config/anythingllm-desktop/storage/.prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59/libquery_engine-linux-nixos.so.node.gz: not in gzip format at genericNodeError (node:internal/errors:984:15) at wrappedFn (node:internal/errors:538:14) at checkExecSyncError (node:child_process:906:11) at Object.execSync (node:child_process:978:15) at Object.execSync (node:electron/js2c/node_init:2:16318) at e_ (/home/floory/.cache/appimage-run/402c7c12e62456effc892827026435c58d2c398e401a1c9bedfbb65b5a9dcf76/resources/app.asar/dist-electron/main/index.js:15:82054) at async /home/floory/.cache/appimage-run/402c7c12e62456effc892827026435c58d2c398e401a1c9bedfbb65b5a9dcf76/resources/app.asar/dist-electron/main/index.js:15:95254 at async D_ (/home/floory/.cache/appimage-run/402c7c12e62456effc892827026435c58d2c398e401a1c9bedfbb65b5a9dcf76/resources/app.asar/dist-electron/main/index.js:15:94340) (Use `anythingllm-desktop --trace-warnings ...` to show where the warning was created) (node:84726) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) ``` but I'm sure that even if this gets resolved, there's still the issue of 'Prisma', which I get even if I add 'prisma' and 'prisma-engines' to my nixpkgs. let me know if any more information is required as i really would love it if anythingllm functioned on nixos, it looks like an amazing project 😀 ### Are there known steps to reproduce? ``` curl -L https://cdn.anythingllm.com/latest/AnythingLLMDesktop.AppImage -o anythingllm-desktop chmod +x anythingllm-desktop appimage-run ./anythingllm-desktop ``` which results in the output above
yindo added the possible bug label 2026-02-22 18:31:40 -05:00
yindo closed this issue 2026-02-22 18:31:40 -05:00
Author
Owner

@timothycarambat commented on GitHub (Oct 13, 2025):

This is a known issue since we did a huge overhaul of the Linux issue - your issue is unique in that, for whatever reason, gunzip, a generic utility, is missing. I am guess that is a NixOs thing

So that will solve your first issue
Add gzip to the environment.systemPackages list (or put in user ENV config)

    environment.systemPackages = with pkgs; [
      # ... other packages
      gzip
    ];

Then rebuild. gunzip should then be an available command. gunzip -V to confirm

@timothycarambat commented on GitHub (Oct 13, 2025): This is a known issue since we did a huge overhaul of the Linux issue - your issue is unique in that, for whatever reason, `gunzip`, a generic utility, is missing. I am guess that is a NixOs thing So that will solve your first issue Add gzip to the environment.systemPackages list (or put in user ENV config) ``` environment.systemPackages = with pkgs; [ # ... other packages gzip ]; ``` Then rebuild. `gunzip` should then be an available command. `gunzip -V` to confirm
Author
Owner

@flooryyyy commented on GitHub (Oct 14, 2025):

gzip is installed on my system, so i'm sure that's not the issue 🙂

@flooryyyy commented on GitHub (Oct 14, 2025): gzip is installed on my system, so i'm sure that's not the issue 🙂
Author
Owner

@timothycarambat commented on GitHub (Oct 14, 2025):

Is it available on the system level or the userspace? The specific line if execSync('gunzip <FILE WE GOT FROM PRISMA>') so gunzip needs to resolve regardless of shell

@timothycarambat commented on GitHub (Oct 14, 2025): Is it available on the system level or the userspace? The specific line if `execSync('gunzip <FILE WE GOT FROM PRISMA>')` so `gunzip` needs to resolve regardless of shell
Author
Owner

@flooryyyy commented on GitHub (Oct 16, 2025):

it is installed in nixos (not home-manager) a.k.a system-level

❯ whence gzip
/run/current-system/sw/bin/gzip

i also tried to do it manually, but..?

❯ gunzip /home/floory/.config/anythingllm-desktop/storage/.prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59/libquery_engine-linux-nixos.so.node.gz

gzip: /home/floory/.config/anythingllm-desktop/storage/.prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59/libquery_engine-linux-nixos.so.node.gz: not in gzip format
@flooryyyy commented on GitHub (Oct 16, 2025): it is installed in nixos (not home-manager) a.k.a system-level ```zsh ❯ whence gzip /run/current-system/sw/bin/gzip ``` i also tried to do it manually, but..? ```zsh ❯ gunzip /home/floory/.config/anythingllm-desktop/storage/.prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59/libquery_engine-linux-nixos.so.node.gz gzip: /home/floory/.config/anythingllm-desktop/storage/.prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59/libquery_engine-linux-nixos.so.node.gz: not in gzip format ```
Author
Owner

@nunodonato commented on GitHub (Nov 18, 2025):

Fedora here, can't install due to the exact same problem.
Gzip is installed and works fine from the command line

@timothycarambat

@nunodonato commented on GitHub (Nov 18, 2025): Fedora here, can't install due to the exact same problem. Gzip is installed and works fine from the command line @timothycarambat
Author
Owner

@flooryyyy commented on GitHub (Nov 18, 2025):

yeah i'd like to add that renaming libquery_engine-linux-nixos.so.node.gz and renaming to libquery_engine-linux-nixos.so.node worked and makes the application actually launch, however, it still is not functional and doesn't actually work. just thought i'd add that bit of information as i'd still like to try anythingllm should this get fixed 😄

@flooryyyy commented on GitHub (Nov 18, 2025): yeah i'd like to add that renaming `libquery_engine-linux-nixos.so.node.gz` and renaming to `libquery_engine-linux-nixos.so.node` worked and makes the application actually launch, however, it still is not functional and doesn't actually work. just thought i'd add that bit of information as i'd still like to try anythingllm should this get fixed 😄
Author
Owner

@Souheab commented on GitHub (Nov 20, 2025):

Also facing the same issue when running the AppImage file on NixOS with appimage-run, not sure what's causing this problem :/

For now, I am using an Arch Linux docker container I made with distrobox to run the AppImage and the application seems to be running without any issues there.

@Souheab commented on GitHub (Nov 20, 2025): Also facing the same issue when running the AppImage file on NixOS with appimage-run, not sure what's causing this problem :/ For now, I am using an Arch Linux docker container I made with distrobox to run the AppImage and the application seems to be running without any issues there.
Author
Owner

@Souheab commented on GitHub (Nov 20, 2025):

I think I have figured out what the issue is for NixOS at least.

The script pulls the gz file from the prisma.sh url

[PrismaHelper] Pulling query_engine for linux-nixos from remote. {
  remote: 'https://binaries.prisma.sh/all_commits/61e140623197a131c2a6189271ffee05a7aa9a59/linux-nixos/libquery_engine.so.node.gz'
}

however if you put this url into a browser it lands on an error 404 page:

Image

So the file downloaded by the script is the actual html document of the 404 page not the gzip file we want and I have confirmed this:

.prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59
❯ file libquery_engine-linux-nixos.so.node.gz
libquery_engine-linux-nixos.so.node.gz: HTML document, ASCII text, with very long lines (611)

.prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59
❯ head -15 libquery_engine-linux-nixos.so.node.gz
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="icon" href="https://www.cloudflare.com/favicon.ico" />
    <title>Not Found</title>
    <style>
      body {
        font-family: system-ui;
        font-weight: 300;
        font-size: 1.25rem;
        color: #36393a;
        display: flex;
        align-items: center;

After changing the file extension from .gz to .html you can open the file in your browser as well and it is the same 404 page that you get from the URL:

Image

So it seems the URL for downloading the gz file is not correct when running the AppImage on NixOS systems

@Souheab commented on GitHub (Nov 20, 2025): I think I have figured out what the issue is for NixOS at least. The script pulls the gz file from the prisma.sh url ``` [PrismaHelper] Pulling query_engine for linux-nixos from remote. { remote: 'https://binaries.prisma.sh/all_commits/61e140623197a131c2a6189271ffee05a7aa9a59/linux-nixos/libquery_engine.so.node.gz' } ``` however if you put this url into a browser it lands on an error 404 page: <img width="1621" height="617" alt="Image" src="https://github.com/user-attachments/assets/a1a0b578-20ce-4c46-8c3b-834f0638a795" /> So the file downloaded by the script is the actual html document of the 404 page not the gzip file we want and I have confirmed this: ``` .prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59 ❯ file libquery_engine-linux-nixos.so.node.gz libquery_engine-linux-nixos.so.node.gz: HTML document, ASCII text, with very long lines (611) .prisma/engines/61e140623197a131c2a6189271ffee05a7aa9a59 ❯ head -15 libquery_engine-linux-nixos.so.node.gz <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="icon" href="https://www.cloudflare.com/favicon.ico" /> <title>Not Found</title> <style> body { font-family: system-ui; font-weight: 300; font-size: 1.25rem; color: #36393a; display: flex; align-items: center; ``` After changing the file extension from .gz to .html you can open the file in your browser as well and it is the same 404 page that you get from the URL: <img width="1552" height="666" alt="Image" src="https://github.com/user-attachments/assets/45230df3-fd13-43a3-b028-dcdf2e947025" /> So it seems the URL for downloading the gz file is not correct when running the AppImage on NixOS systems
Author
Owner

@tuftman-0 commented on GitHub (Dec 2, 2025):

I still have this exact issue on NixOS

@tuftman-0 commented on GitHub (Dec 2, 2025): I still have this exact issue on NixOS
Author
Owner

@kr-nn commented on GitHub (Dec 8, 2025):

This should be reopened. I think your CDN is blocking linux useragents.

edit: correction, looks like nixos is just not supported seeing the URL:
linux-nixos

@kr-nn commented on GitHub (Dec 8, 2025): This should be reopened. I think your CDN is blocking linux useragents. edit: correction, looks like nixos is just not supported seeing the URL: linux-nixos
Author
Owner

@flooryyyy commented on GitHub (Jan 28, 2026):

so how do we fix it xd

@flooryyyy commented on GitHub (Jan 28, 2026): so how do we fix it xd
yindo changed title from [BUG]: won't run on nixos to [GH-ISSUE #4533] [BUG]: won't run on nixos 2026-06-05 14:49:04 -04:00
Author
Owner

@Tarbetu commented on GitHub (Mar 16, 2026):

It seems like some folks just wanted to use compiled binaries for NixOS. (Providing binaries for Nix is a bit unusual)

https://github.com/prisma/prisma/discussions/14873
https://www.prisma.io/docs/orm/reference/prisma-schema-reference#binarytargets-options

It seems like their favourite ORM library, Prisma, does not provide any pre-compiled Nix packages. (Btw, they are available in nix-pkgs)

So, instead of an AppImage, someone should prepare a flake for it. I am willing to do it, but I don't know anything about the Node.js environment.

<!-- gh-comment-id:4067903071 --> @Tarbetu commented on GitHub (Mar 16, 2026): It seems like some folks just wanted to use compiled binaries for NixOS. (Providing binaries for Nix is a bit unusual) https://github.com/prisma/prisma/discussions/14873 https://www.prisma.io/docs/orm/reference/prisma-schema-reference#binarytargets-options It seems like their favourite ORM library, Prisma, does not provide any pre-compiled Nix packages. (Btw, they are available in nix-pkgs) So, instead of an AppImage, someone should prepare a flake for it. I am willing to do it, but I don't know anything about the Node.js environment.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2886