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)

      sudo cp /etc/lsb-release /etc/lsb-release_bak
    
  • 安装(install)

      ➜ sudo dpkg -i weixin_2.1.1_amd64.deb
      Selecting previously unselected package weixin.
      (Reading database ... 294966 files and directories currently installed.)
      Preparing to unpack weixin_2.1.1_amd64.deb ...
      Unpacking weixin (2.1.1) ...
      Setting up weixin (2.1.1) ...
      Processing triggers for bamfdaemon (0.5.6+22.04.20220217-0ubuntu1) ...
      Rebuilding /usr/share/applications/bamf-2.index...
      Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
      Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
      Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
      Processing triggers for hicolor-icon-theme (0.17-2) ...
    
  • 还原/etc/lsb-release 文件(09/03/2023日更新:如果要使用该版本微信,请不要还原该文件,具体原因见文末)

      ➜ cat /etc/lsb-release                       
      DISTRIB_ID=Kylin
      DISTRIB_RELEASE=V10
      DISTRIB_CODENAME=kylin
      DISTRIB_DESCRIPTION="Kylin V10 SP1"
      DISTRIB_KYLIN_RELEASE=V10
      DISTRIB_VERSION_TYPE=enterprise
      DISTRIB_VERSION_MODE=normal
    
      ➜ sudo cp /etc/lsb-release_bak /etc/lsb-release
    
      ➜ cat /etc/lsb-release
      DISTRIB_ID=Ubuntu
      DISTRIB_RELEASE=22.04
      DISTRIB_CODENAME=jammy
      DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
    

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

➜  cat /usr/share/applications/weixin.desktop
[Desktop Entry]
Name[tr]=weixin
Name[en]=Wechat # add en name if you need
Name[zh_CN]=微信
Exec=/opt/weixin/weixin %U
Terminal=false
Type=Application
Icon=weixin
StartupWMClass=weixin
Comment=微信桌面版
Categories=Utility;

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

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

➜  update-desktop-database

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

Wechat desktop

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

1.  sudo apt remove weixin
2.  sudo dpkg -i weixin_2.1.1_amd64.deb

md5核对:d6827fc8a0a86ac88a3fd0068700095e weixin_2.1.1_amd64.deb

相关文章:

翻译: