diff --git a/setup.sh b/setup.sh index 73fc97c..d1bad47 100755 --- a/setup.sh +++ b/setup.sh @@ -92,6 +92,18 @@ install_bun() { warning "未检测到 Node.js 或 Bun" info "推荐安装 Bun(轻量级 JavaScript 运行时)" echo "" + + # 检测 unzip 依赖 + if ! command_exists unzip; then + error "安装 Bun 需要 unzip,请先安装:" + echo "" + echo -e " Ubuntu/Debian: ${CYAN}sudo apt-get install unzip${NC}" + echo -e " Alpine: ${CYAN}apk add unzip${NC}" + echo -e " CentOS/RHEL: ${CYAN}sudo yum install unzip${NC}" + echo "" + return 1 + fi + echo -e " 安装命令: ${CYAN}curl -fsSL https://bun.sh/install | bash${NC}" echo ""