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

相關文章:

翻譯: