llm install_error ai_generated true

Error: 拉取模型清单:文件不存在:/usr/share/ollama/.ollama/models/blobs/sha256-...

Error: pull model manifest: file does not exist: /usr/share/ollama/.ollama/models/blobs/sha256-...

ID: llm/ollama-model-not-found-pull-failed

其他格式: JSON · Markdown 中文 · English
88%修复率
86%置信度
1证据数
2024-02-01首次发现

版本兼容性

版本状态引入弃用备注
Ollama 0.1.20 active
Ollama 0.1.25 active
Ollama 0.1.30 active
Linux amd64 active
macOS arm64 active

根因分析

Ollama模型拉取失败,因为本地模型缓存中缺少所需的blob文件,通常是由于下载不完整、磁盘损坏或模型存储目录的权限问题。

English

Ollama model pull fails because a required blob file is missing from the local model cache, often due to incomplete download, disk corruption, or permission issues in the model storage directory.

generic

官方文档

https://github.com/ollama/ollama/blob/main/docs/faq.md

解决方案

  1. 删除损坏的模型并重新拉取:
    
    ollama rm llama2
    rm -rf ~/.ollama/models/blobs/sha256-*
    ollama pull llama2
  2. 检查磁盘空间和权限,然后重启Ollama服务并重试:
    
    df -h /usr/share/ollama/
    sudo chown -R ollama:ollama /usr/share/ollama/.ollama
    sudo systemctl restart ollama
    ollama pull llama2

无效尝试

常见但无效的做法:

  1. 100% 失败

    Creates an empty file that fails integrity checks; Ollama will still error on hash verification.

  2. 50% 失败

    Changes file ownership to root, causing subsequent permission errors for non-root Ollama processes.