# cursor-node-u18 **Repository Path**: iguolong/cursor-node-u18 ## Basic Information - **Project Name**: cursor-node-u18 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-13 - **Last Updated**: 2026-07-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # cursor-node-u18 让 Ubuntu 18.04(GLIBC 2.27)能跑较新的 Cursor Remote-SSH。 ## 背景 Cursor 自带的 `node` 和预编译 `pty.node` 需要 GLIBC 2.28+。 本仓库提供适配 U18 的: - `node-u18-x86-64`:可在 U18 运行的 Node 20 - `pty.node-u18-x86-64`:针对上述 Node 编译的终端原生模块 - `deploy.sh`:自动替换当前 `~/.cursor-server` 中的 node / pty.node ## 操作步骤 ### 1. 克隆仓库(在远程 Ubuntu 机器上) ```bash cd ~ git clone https://gitee.com/iguolong/cursor-node-u18 cd cursor-node-u18 ``` ### 2. 先用本机 Cursor 连上一次远程 确保远端已经生成: ```text ~/.cursor-server/bin/linux-x64// ``` 如果还没有这个目录,先正常 Remote-SSH 连接一次(即使终端不可用也没关系)。 ### 3. 在远程机器执行部署脚本 ```bash cd ~/cursor-node-u18 bash deploy.sh ``` 脚本会自动: 1. 找到最新的 `~/.cursor-server/bin/linux-x64//` 2. 备份原 `node` 为 `node.bak`(若存在) 3. 将 `node` 软链接到本仓库的 `node-u18-x86-64` 4. 备份原 `pty.node` 为 `pty.node.glibc228.bak`(若存在) 5. 用本仓库的 `pty.node-u18-x86-64` 覆盖 `node-pty` 的 `pty.node` 6. 做一次 `node -v` 和 PTY 自检(应看到 `PTY_OK`) ### 4. 在本机 Cursor 强制重启远程服务(必须) 命令面板(`Cmd+Shift+P` / `Ctrl+Shift+P`)执行: ```text Remote-SSH: Kill Remote Server and Reload Window ``` 注意: - 只点 Reload Window 不够 - 必须 Kill Remote Server,否则旧的 `ptyHost` 进程不会加载新的 `pty.node` - 重连后新开一个终端验证是否可用 ## Cursor 升级后再次失效时 Cursor 更新后会下载新的 `` 目录,需要再执行一次: ```bash cd ~/cursor-node-u18 bash deploy.sh ``` 然后再次在本机执行: ```text Remote-SSH: Kill Remote Server and Reload Window ``` ## 目录说明 ```text cursor-node-u18/ ├── deploy.sh # 一键部署脚本 ├── node-u18-x86-64 # U18 可用的 Node ├── pty.node-u18-x86-64 # U18 可用的 pty 原生模块 └── README.md # 本说明 ``` ## 常见问题 1. `ERROR: 未找到 ~/.cursor-server/bin/linux-x64/` - 先用 Cursor Remote-SSH 成功连接一次,再跑 `bash deploy.sh` 2. 脚本显示 `PTY_OK`,但 Cursor 终端仍不可用 - 多半没 Kill Remote Server;请按第 4 步强制重启远程服务 3. 想手动指定某个 commit 目录 - 当前脚本默认取最新目录;如需改成指定目录,可编辑 `deploy.sh` 中的 `CUR_DIR=` 赋值