fix: CTP 需 zh_CN.GB18030 中文 locale 而非仅 UTF-8
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -27,10 +27,13 @@ need_install python3-venv python3-venv
|
||||
need_install git git
|
||||
|
||||
# vnpy_ctp 在 Linux 上需本地编译(Meson + pkg-config 查找 python3-dev)
|
||||
echo "==> 安装 vnpy_ctp 编译依赖..."
|
||||
echo "==> 安装 vnpy_ctp 编译依赖与 CTP 中文 locale..."
|
||||
apt-get install -y build-essential python3-dev pkg-config locales
|
||||
locale-gen en_US.UTF-8 C.UTF-8 2>/dev/null || true
|
||||
update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 2>/dev/null || true
|
||||
# CTP C++ API 登录回调需要 zh_CN.GB18030(vnpy/vnpy_ctp#24)
|
||||
sed -i '/^# zh_CN.GB18030/s/^# //' /etc/locale.gen 2>/dev/null || true
|
||||
sed -i '/^# zh_CN.UTF-8/s/^# //' /etc/locale.gen 2>/dev/null || true
|
||||
locale-gen zh_CN.GB18030 zh_CN.UTF-8 en_US.UTF-8 2>/dev/null || locale-gen
|
||||
update-locale LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8 2>/dev/null || true
|
||||
|
||||
if ! command -v pm2 &>/dev/null; then
|
||||
echo "==> 安装 PM2..."
|
||||
|
||||
Reference in New Issue
Block a user