4.1 KiB
4.1 KiB
Deepin-Wine 微信安装(Linux Mint/Ubuntu)
针对 Linux Mint 22.3 / Ubuntu 24.04,2026-06-15 实测
微信官方 Linux 版:存在但已废弃
腾讯确实有 Linux 版微信 deb 包(2026-06-09 仍有更新),但功能残缺、频繁闪退,已基本废弃。
下载链接(2026-06-15 实测有效):
https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_x86_64.deb
大小约 202MB,用 aria2 多线程下载速度可达 10MB/s:
# 安装 aria2
sudo apt-get install -y aria2
# 多线程下载
aria2c -x 8 -s 8 -d /tmp -o wechat.deb https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_x86_64.deb
# 安装
sudo dpkg -i /tmp/wechat.deb
sudo apt-get install -f # 修复依赖
已知问题: 启动时可能超时/闪退(wechat --version 会卡住),因为腾讯已停止维护此版本。
结论: 仅适合尝鲜,生产使用推荐 deepin-wine 或虚拟机方案。
标准方案(zq1997/deepin-wine)
GitHub: https://github.com/zq1997/deepin-wine
步骤 1:添加仓库
# 方法A:运行官方脚本(网络访问 deepin-wine.i-m.dev 有时会超时)
wget -O- https://deepin-wine.i-m.dev/setup.sh | sh
# 方法B:手动添加(脚本超时时的替代)
echo 'deb [trusted=yes] https://deepin-wine.i-m.dev /' | sudo tee /etc/apt/sources.list.d/deepin-wine.i-m.dev.list
# 设置优先级
printf 'Package: *\nPin: release l=deepin-wine\nPin-Priority: 400\n' | sudo tee /etc/apt/preferences.d/deepin-wine.i-m.dev.pref
# 添加 XDG_DATA_DIRS(应用图标显示需要)
printf 'XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/local/share:/usr/share}\nfor deepin_dir in /opt/apps/*/entries; do\n [ -d "$deepin_dir" ] && XDG_DATA_DIRS="$XDG_DATA_DIRS:$deepin_dir"\ndone\nexport XDG_DATA_DIRS\n' | sudo tee /etc/profile.d/deepin-wine.i-m.dev.sh
步骤 2:更新并安装
sudo apt-get update
sudo apt-get install -y com.qq.weixin.tools.deepin # 微信
sudo apt-get install -y com.qq.im.deepin # QQ
⚠️ Linux Mint 22.3 / Ubuntu 24.04 的依赖问题
症状:
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。
下列软件包有未满足的依赖关系:
deepin-wine8-stable : 依赖: libsane (>= 1.0.24)
推荐: libodbc1 但无法安装它
推荐: libosmesa6 但是它将不会被安装
原因: Ubuntu 24.04 / Mint 22.3 的 libsane 版本不满足 deepin-wine8-stable 的要求,且 libodbc1、libosmesa6 等推荐包装不上。这是系统库层面的不兼容,不是配置问题,无法绕过。
实测结论(2026-06-15):
- Linux Mint 22.3 / Ubuntu 24.04 上 deepin-wine 微信无法安装
- 唯一可行方案:换 Deepin 系统 或 虚拟机跑 Windows 微信
sudo 密码传递技巧(heredoc pipe 失效问题)
无效写法:
# heredoc 中的管道会失效,密码无法传入
sudo -S command << 'EOF'
z1020
EOF
有效写法:
# 用 echo 传递密码
echo 'z1020' | sudo -S apt-get update
echo 'z1020' | sudo -S tee /path/to/file > /dev/null
文件内容写入空文件问题:
# heredoc + sudo tee 如果 heredoc 在 sudo 之前,文件会是空的
sudo tee file << 'EOF' # 密码在 heredoc 里,tee 收不到
content
EOF
# 正确做法
echo 'z1020' | sudo -S sh -c 'cat > /path/to/file << "INNER"
content
INNER'
# 或者直接echo
echo 'content' | sudo -S tee file > /dev/null
包名速查
| 应用 | 包名 |
|---|---|
| 微信 | com.qq.weixin.tools.deepin |
| 企业微信 | com.qq.weixin.work.deepin |
com.qq.im.deepin |
|
| TIM | com.qq.office.deepin |
| 钉钉 | com.dingtalk.deepin |
替代方案(deepin-wine 失败时)
- 虚拟机 Windows 微信 — 完美运行,不依赖 wine 兼容性,推荐
- 换 Deepin OS — 微信原生支持,其他发行版无法稳定运行微信时最终方案
- AppImage 版 QQ —
flatpak或第三方维护的 AppImage