Ubuntu安装微信(Ubuntu install Wechat)

微信官方没有直接提供 Linux 系统客户端,Wine 的微信不喜欢,麒麟软件与腾讯公司联手推动了基于 Linux 平台的原生微信适配工作,提供了个 deb 包,不是 wine 的,勉强可以使用

1. 下载 deb 包 (download deb package)

去优麒麟的下载页 https://www.ubuntukylin.com/applications/106-cn.html,右键打开浏览器的调试工具,找到deb包的下载地址:https://archive.ubuntukylin.com/software/pool/partner/weixin_2.1.1_amd64.deb 下载,直接点按钮下载不了(只是刷新网页,至少我的情况是这样,想办法下载下来即可)

Wechat download

2. 命令行安装

  • 备份/etc/lsb-release 文件,该 deb 包会更改这个文件的内容 (backup lsb-release file)
1sudo cp /etc/lsb-release /etc/lsb-release_bak
  • 安装(install)
 1➜ sudo dpkg -i weixin_2.1.1_amd64.deb
 2Selecting previously unselected package weixin.
 3(Reading database ... 294966 files and directories currently installed.)
 4Preparing to unpack weixin_2.1.1_amd64.deb ...
 5Unpacking weixin (2.1.1) ...
 6Setting up weixin (2.1.1) ...
 7Processing triggers for bamfdaemon (0.5.6+22.04.20220217-0ubuntu1) ...
 8Rebuilding /usr/share/applications/bamf-2.index...
 9Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
10Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
11Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
12Processing triggers for hicolor-icon-theme (0.17-2) ...
  • 还原/etc/lsb-release 文件(09/03/2023 日更新:如果要使用该版本微信,请不要还原该文件,具体原因见文末)
 1➜ cat /etc/lsb-release
 2DISTRIB_ID=Kylin
 3DISTRIB_RELEASE=V10
 4DISTRIB_CODENAME=kylin
 5DISTRIB_DESCRIPTION="Kylin V10 SP1"
 6DISTRIB_KYLIN_RELEASE=V10
 7DISTRIB_VERSION_TYPE=enterprise
 8DISTRIB_VERSION_MODE=normal
 9
10➜ sudo cp /etc/lsb-release_bak /etc/lsb-release
11
12➜ cat /etc/lsb-release
13DISTRIB_ID=Ubuntu
14DISTRIB_RELEASE=22.04
15DISTRIB_CODENAME=jammy
16DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"

3. 添加英文环境软件名 (add en name at weixin.desktop)

 1➜  cat /usr/share/applications/weixin.desktop
 2[Desktop Entry]
 3Name[tr]=weixin
 4Name[en]=Wechat # add en name if you need
 5Name[zh_CN]=微信
 6Exec=/opt/weixin/weixin %U
 7Terminal=false
 8Type=Application
 9Icon=weixin
10StartupWMClass=weixin
11Comment=微信桌面版
12Categories=Utility;

添加这一行(add this line if you are english user),如果是英文环境: Name[en]=Wechat

4. 更新图标信息 update-desktop-database (option)

1➜  update-desktop-database

5. 查看结果 (Let me see see ^_^)

Wechat desktop

09/03/2023 日更新:最近有读者反馈,扫描二维码后软件无法登录,经测试情况属实,解决方式是卸载重新安装,重新安装后正常登录使用, 重新安装为什么可以使用呢?原来这个版本的微信会验证 /etc/lsb-release 这文件是否为统信,重新安装会更改为符合要求的内容,手动滑稽啊,这格局小了点!参见Arch wiki WeChat

11.  sudo apt remove weixin
22.  sudo dpkg -i weixin_2.1.1_amd64.deb

md5 核对:d6827fc8a0a86ac88a3fd0068700095e weixin_2.1.1_amd64.deb

最后修改于: Wednesday, September 13, 2023
欢迎关注微信公众号,留言交流。

相关文章:

翻译: