CostPrediction/scripts/setup_linux.sh

36 lines
1.1 KiB
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 此脚本用于安装 Linux 系统级依赖
# 主要用于:
# 1. 打包环境准备
# 2. 新系统的初始化
# 3. CI/CD 环境设置
# 更新包列表
sudo apt update
# 安装系统依赖
echo "Installing system dependencies..."
sudo apt install -y \
python3.11 \ # Python 3.11 解释器
python3.11-venv \ # Python 虚拟环境支持
python3-pip \ # Python 包管理器
build-essential \ # 编译工具
python3.11-dev \ # Python 开发库
nodejs \ # Node.js用于前端构建
npm \ # Node.js 包管理器
binutils \ # 二进制工具(用于 PyInstaller
tar \ # 打包工具
gzip \ # 压缩工具
mysql-client \ # MySQL 客户端
libmysqlclient-dev \ # MySQL 开发库
gcc \ # C 编译器
g++ \ # C++ 编译器
libssl-dev \ # SSL 支持
xdg-utils # 用于打开浏览器
# 验证安装
echo "Verifying installations..."
python3.11 --version
node --version
npm --version