依赖安装脚本

一个跨平台的依赖安装脚本,用于安装Node.js、npx和uv等工具。

  • by Xeonice
  • Shell
  • 本地部署
  • 更新于
在 GitHub 查看 xeonice/mcp-depedencies-install

使用说明

MCP依赖关系安装程序

英语 | 简体中文 | 日本语

Node.js、npx和uv的跨平台依赖安装脚本。

支持的操作系统

  • Linux(Ubuntu、AlmaLinux/CentOS、Alpine)
  • macOS
  • 视窗

安装方法

Linux

Ubuntu/Debian

# Download the installation script
curl -O https://raw.githubusercontent.com/yourusername/mcp-depedencies-install/main/install_dependencies.sh

# Make the script executable
chmod +x install_dependencies.sh

# Run the installation script
./install_dependencies.sh

AlmaLinux/CentOS

# Download the installation script
curl -O https://raw.githubusercontent.com/yourusername/mcp-depedencies-install/main/install_dependencies.sh

# Make the script executable
chmod +x install_dependencies.sh

# Run the installation script
./install_dependencies.sh

Alpine Linux

# Download the installation script
curl -O https://raw.githubusercontent.com/yourusername/mcp-depedencies-install/main/install_dependencies.sh

# Make the script executable
chmod +x install_dependencies.sh

# Run the installation script
./install_dependencies.sh

macOS

# Download the installation script
curl -O https://raw.githubusercontent.com/yourusername/mcp-depedencies-install/main/install_dependencies.sh

# Make the script executable
chmod +x install_dependencies.sh

# Run the installation script
./install_dependencies.sh

视窗

# Download the installation script
curl -O https://raw.githubusercontent.com/yourusername/mcp-depedencies-install/main/install_dependencies.sh

# Make the script executable (if using Git Bash or WSL)
chmod +x install_dependencies.sh

# Run the installation script
./install_dependencies.sh

先决条件

Linux

  • curl 和 sudo 安装在您的系统上
  • 对于Ubuntu/Debian: apt-get 包管理器
  • 对于AlmaLinux/CentOS: dnf 或 yum 包管理器
  • 对于Alpine: apk 包管理器

macOS

  • curl 安装在您的系统上
  • Homebrew(如果不存在,将自动安装)

视窗

  • 已安装Windows软件包管理器(winget)
  • Git Bash、WSL或PowerShell用于运行脚本

安装什么

该脚本将安装以下依赖项:

  1. Node.js(v22.x LTS)
  2. npx(v10.x)
  3. 紫外线(v0.6.x)

测试

要跨不同环境测试安装脚本,请执行以下操作:

# Make the test script executable
chmod +x test_dependencies.sh

# Run the tests
./test_dependencies.sh

这将测试Docker容器中的安装脚本,模拟:

  • 乌班图
  • AlmaLinux(CentOS)
  • Alpine Linux
  • macOS
  • 视窗

备注

  • 该脚本需要Linux系统上的sudo权限
  • 安装后,您可能需要重新启动终端以使PATH更改生效
  • 对于Linux和macOS用户,该脚本会自动将本地bin目录添加到PATH中
  • Windows用户应确保在运行脚本之前安装了Windows软件包管理器(winget)

许可证

[您的许可证在这里]