Files
vue-driven-cloud-storage/install.sh
喻勇祥 ee3c522a37 修复: 改进npm依赖安装,解决better-sqlite3编译失败问题
问题分析:
- better-sqlite3是native模块,需要node-gyp编译
- node-gyp需要Python环境
- 部分系统只有python3命令,没有python命令
- 导致编译失败: "python3" is not in PATH or produced an error

修复内容:
1. 在安装和更新依赖前自动创建python软链接(python -> python3)
2. 配置npm使用python3: npm config set python python3
3. 添加依赖安装进度提示(避免用户以为卡住)
4. 改进错误处理和提示信息
5. 安装失败时提供详细的解决方案和日志路径
6. 支持用户选择忽略错误继续安装

适用场景:
- Ubuntu/Debian: 使用ln -sf创建软链接
- CentOS/RHEL: 使用alternatives管理Python版本
- 其他系统: 回退到ln -sf

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 12:01:44 +08:00

81 KiB