fix: install zstd dependency before Ollama installer

This commit is contained in:
Claus Lohmar 2026-05-30 15:22:03 +00:00
parent 57f501e0c8
commit 357483cfd2

View file

@ -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"