From 357483cfd29e00e809cbe2731610ac1186e19c40 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Sat, 30 May 2026 15:22:03 +0000 Subject: [PATCH] fix: install zstd dependency before Ollama installer --- install.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 13607bb..a09b30e 100755 --- a/install.sh +++ b/install.sh @@ -133,12 +133,32 @@ case "$AI_CHOICE" in 3) AI_PROVIDER="ollama" AI_MODEL="qwen3.5:2b" + # Ollama's install script requires zstd + if ! command -v zstd &>/dev/null; then + info "Installing zstd (required by Ollama)..." + if command -v apt-get &>/dev/null; then + apt-get update -qq && apt-get install -y -qq zstd 2>&1 | tail -1 + elif command -v dnf &>/dev/null; then + dnf install -y zstd 2>&1 | tail -1 + elif command -v yum &>/dev/null; then + yum install -y zstd 2>&1 | tail -1 + elif command -v apk &>/dev/null; then + apk add zstd 2>&1 | tail -1 + else + warn "Please install zstd manually, then re-run install.sh" + fi + fi info "Installing Ollama..." if ! command -v ollama &>/dev/null; then - curl -fsSL https://ollama.com/install.sh | sh 2>&1 | tail -3 + curl -fsSL https://ollama.com/install.sh | sh 2>&1 | tail -5 else info "Ollama already installed" fi + # Wait for Ollama to be ready + for i in $(seq 1 10); do + if ollama --version &>/dev/null; then break; fi + sleep 2 + done info "Pulling model $AI_MODEL (this may take a while)..." ollama pull "$AI_MODEL" 2>&1 | tail -3 AI_BASE_URL="http://localhost:11434"