ollama - 💡(How to fix) Fix ollama generate images failed in cuda 13.1 [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#14727Fetched 2026-04-08 00:32:27
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
commented ×1labeled ×1subscribed ×1

Error Message

The result is "Error: 500 Internal Server Error: Post "http://127.0.0.1:40927/completion": EOF" ollama serve repoted MLX error: Failed to compile kernel: nvrtc: error: failed to open libnvrtc-builtins.so.13.0.

RAW_BUFFERClick to expand / collapse

What is the issue?

How to reproduce this problem?

ollama run x/z-image-turbo:bf16 "a cat holding a sign that says hello world"

The result is "Error: 500 Internal Server Error: Post "http://127.0.0.1:40927/completion": EOF"

ollama serve repoted MLX error: Failed to compile kernel: nvrtc: error: failed to open libnvrtc-builtins.so.13.0.

My cuda version is V13.1.80

Relevant log output

OS

No response

GPU

No response

CPU

No response

Ollama version

No response

extent analysis

Fix Plan

The fix involves updating the CUDA version compatibility and ensuring the correct library paths are set.

Steps to Fix

  • Update the nvrtc library to match the CUDA version (13.1.80) by installing the correct nvrtc package.
  • Set the LD_LIBRARY_PATH environment variable to include the path to libnvrtc-builtins.so.13.0.

Example Code

# Install the correct nvrtc package
sudo apt-get install nvidia-cuda-toolkit

# Set the LD_LIBRARY_PATH environment variable
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-13.1/lib64

# Verify the library path
ldconfig -v | grep libnvrtc-builtins.so.13.0

Verification

Run the ollama command again to verify that the error is resolved:

ollama run x/z-image-turbo:bf16 "a cat holding a sign that says hello world"

If the issue persists, check the ollama logs for any other error messages.

Extra Tips

  • Ensure that the CUDA version is compatible with the ollama version.
  • Verify that the libnvrtc-builtins.so.13.0 library exists in the specified path.
  • If using a Docker container, ensure that the container has the correct CUDA version and library paths set.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING