#8930·jan

bug: Debian 13 and Flatpack - libnccl2 missing

Author: canonexCreated Sep 12, 2026Updated Sep 17, 2026

Version: v0.8.4

Describe the Bug

In Debian 13 Flatpack it does not find libraries

Steps to Reproduce

  1. Be in Debian, Nvidia and CUDA from Debian package
  2. Install Jan from Flathub
  3. Try to run it: you get:
Generation failed
Failed to create model: Failed to start model: "LlamacppError { code: LlamaCppProcessError, message: \"The model process encountered an unexpected error.\" }"
  1. read the log you find that libnccl2 is missing and cannot be found from the flatpak:
[2026-09-11][22:15:19][tauri_plugin_llamacpp::router][INFO] [llamacpp-router] /home/user/.var/app/ai.jan.Jan/data/Jan/data/llamacpp/backends/b9967/linux-avx-cuda-cu12.0-x64/build/bin/llama-server: error while loading shared libraries: libnccl.so.2: cannot open shared object file: No such file or directory
[2026-09-11][22:15:19][tauri_plugin_llamacpp::router][ERROR] llama-server router exited before readiness: ExitStatus(unix_wait_status(32512))
[2026-09-11][22:15:19][webview:l@tauri://localhost/assets/index-qC5avcdD.js:53:5579][ERROR] Failed to start model Jan-v3.5-4B-Q4_K_XL for provider llamacpp: LlamacppError { code: LlamaCppProcessError, message: "The model process encountered an unexpected error." }
[2026-09-11][22:15:19][webview:l@tauri://localhost/assets/index-qC5avcdD.js:53:5579][ERROR] Failed to start llamacpp model: LlamacppError { code: LlamaCppProcessError, message: "The model process encountered an unexpected error." }
[2026-09-11][22:15:19][webview:l@tauri://localhost/assets/index-qC5avcdD.js:53:5579][ERROR] Failed to create model: Failed to start model: "LlamacppError { code: LlamaCppProcessError, message: \"The model process encountered an unexpected error.\" }"
  1. if you analyze the dependencies:
$ flatpak run --command=sh ai.jan.Jan -c '                                                                                                                                    BACKEND="/home/user/.var/app/ai.jan.Jan/data/Jan/data/llamacpp/backends/b9967/linux-avx-cuda-cu12.0-x64/build/bin"

echo "=== NCCL ==="
ls -l "$BACKEND/libnccl.so.2"

echo
echo "=== dependencies ==="
ldd "$BACKEND/llama-server" 2>&1 | grep -E "not found|nccl|cuda|cudart"

echo
echo "=== version ==="
"$BACKEND/llama-server" --version
'
F: Not sharing "/usr/lib/x86_64-linux-gnu" with sandbox: Path "/usr" is reserved by Flatpak
=== NCCL ===
-rw-r--r-- 1 user user 241002200 12 set 00.38 /home/user/.var/app/ai.jan.Jan/data/Jan/data/llamacpp/backends/b9967/linux-avx-cuda-cu12.0-x64/build/bin/libnccl.so.2

=== dependencies ===
	libllama-server-impl.so => /home/user/.var/app/ai.jan.Jan/data/Jan/data/llamacpp/backends/b9967/linux-avx-cuda-cu12.0-x64/build/bin/libllama-server-impl.so (0x00007f2a22e00000)
	libllama-common.so.0 => not found
	libmtmd.so.0 => not found
	libllama.so.0 => not found
	libggml.so.0 => not found
	libggml-base.so.0 => not found

=== version ===
/home/user/.var/app/ai.jan.Jan/data/Jan/data/llamacpp/backends/b9967/linux-avx-cuda-cu12.0-x64/build/bin/llama-server: error while loading shared libraries: libllama-common.so.0: cannot open shared object file: No such file or directory
  1. With the help of other LLM I got the following fix:
bash
# 1. Install host NCCL
sudo apt install libnccl2

# 2. Find Jan's backend
find ~/.var/app/ai.jan.Jan/data/Jan/data/llamacpp/backends \
  -path '*/linux-avx-cuda-*/build/bin/llama-server' -print

# 3. Set BACKEND to the containing build/bin directory
BACKEND="..."

# 4. Copy NCCL into it
cp -L /usr/lib/x86_64-linux-gnu/libnccl.so.2 "$BACKEND/"

# 5. Make Jan's bundled libraries look beside themselves
sudo apt install patchelf

for f in \
    "$BACKEND/llama-server" \
    "$BACKEND"/libllama-server-impl.so \
    "$BACKEND"/libllama-common.so.* \
    "$BACKEND"/libllama.so.* \
    "$BACKEND"/libmtmd.so.* \
    "$BACKEND"/libggml-cuda.so.* \
    "$BACKEND"/libggml-cpu.so.* \
    "$BACKEND"/libggml.so.*
do
    patchelf --set-rpath '$ORIGIN' "$f"
done

# 6. Verify
ldd "$BACKEND/llama-server" | grep 'not found'
"$BACKEND/llama-server" --version

Screenshots / Logs

Image

Operating System

  • MacOS
  • Windows
  • Linux