v1.1.2: 修复依赖安装问题

主要修复:
1. 降级 better-sqlite3: 12.4.1 → 11.8.1
   - 兼容 Node.js 18.x
   - 解决版本不匹配导致的安装失败

2. 添加编译工具依赖
   - APT: build-essential, python3
   - YUM/DNF: gcc-c++, make, python3
   - Zypper: gcc-c++, make, python3
   - 解决原生模块编译失败问题

问题分析:
- better-sqlite3@12+ 要求 Node.js 20+
- 编译原生模块需要 C++ 编译器和 Python
- 旧版本服务器可能缺少编译工具链

解决方案:
- 使用兼容 Node.js 18+ 的 better-sqlite3 版本
- 自动安装所有必需的编译工具
- 确保在所有支持的系统上都能正常编译
This commit is contained in:
WanWanYun
2025-11-10 23:35:33 +08:00
parent 1eb619a0b6
commit 8c7664a400
2 changed files with 6 additions and 6 deletions

View File

@@ -3,7 +3,7 @@
################################################################################
# 玩玩云 (WanWanYun) - 一键部署脚本
# 项目地址: https://gitee.com/yu-yon/vue-driven-cloud-storage
# 版本: v1.1.1
# 版本: v1.1.2
################################################################################
set -e
@@ -377,22 +377,22 @@ install_dependencies() {
case $PKG_MANAGER in
apt)
apt-get update
apt-get install -y curl wget git unzip lsb-release
apt-get install -y curl wget git unzip lsb-release build-essential python3
install_nodejs_apt
install_nginx_apt
;;
yum)
yum install -y curl wget git unzip redhat-lsb-core
yum install -y curl wget git unzip redhat-lsb-core gcc-c++ make python3
install_nodejs_yum
install_nginx_yum
;;
dnf)
dnf install -y curl wget git unzip redhat-lsb-core
dnf install -y curl wget git unzip redhat-lsb-core gcc-c++ make python3
install_nodejs_dnf
install_nginx_dnf
;;
zypper)
zypper install -y curl wget git unzip lsb-release
zypper install -y curl wget git unzip lsb-release gcc-c++ make python3
install_nodejs_zypper
install_nginx_zypper
;;