Ubuntu16.04下安装Wechat

来源:互联网 发布:vscode npm start 编辑:程序博客网 时间:2024/06/05 22:38

Ubuntu16.04下安装Wechat

很久没写博客了,前两天电脑因为teamviewer不了,原因显示是libqt5gui5版本过低,研究了一波更新,卸载了libqt5gui5,和它的依赖qtbase5-dev,打算重新安装新版本,结果重启后电脑无法启动。。。进入tty折腾半天后,被迫重装了系统,心血来潮的装了16.04,之前用的是14.04,记录下安装Wechat的过程,之前安装的忘记记录了,导致这次花了一两个小时配置各种环境

Ps:teamviewer的升级问题还没解决,有时间继续折腾

  • Github下载Wechat源码
  • 按照wiki编译源码
  • 编译中可能会遇到的一些问题
  • 编译成功后将微信固定在桌面

Github下载Wechat源码

https://github.com/geeeeeeeeek/electronic-wechat.git 下载后解压到本地

按照wiki编译源码

# Go into the repositorycd electronic-wechat-master# Install dependencies and run the appnpm install && npm start

编译中可能会遇到的一些问题

首先保证已安装nodejs,npm !!!

如果编译失败,在文件夹npm-debug.log会显示报错信息,我这里遇到了nodejs和npm版本过低的问题

解决方式如下:

更新ubuntu软件源

sudo apt-get updatesudo apt-get install -y python-software-properties software-properties-common# 注意这里可能会报错 The repository 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial Release' does not have a Release file.(ps:我用的是后面那句成功更新了6.x的版本)sudo add-apt-repository ppa:chris-lea/node.js 或 curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -  sudo apt-get update

The repository ‘http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial Release’ does not have a Release file.报错解决方式如下:
来自:https://github.com/nodesource/distributions/issues/324

sudo add-apt-repository -y -r ppa:chris-lea/node.jssudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list

安装nodejs

sudo apt-get install nodejssudo apt install nodejs-legacysudo apt install npm

安装成功后,继续按照wiki编译源码,成功后会弹出wechat登录框

编译成功后将微信固定在桌面

先将源码打包

cd electronic-wechat-masternpm run build:osxnpm run build:linuxnpm run build:win32npm run build:win64
  1. 打包成功会生成文件夹dist,点击进入,electronic-wechat就是所需要的可执行程序。
  2. 下载一张微信icon图片放到该文件夹下
# 设置wechat路径及iconsudo gedit /usr/share/applications/wechat.desktop# 弹出文本,输入[Desktop Entry]Name=WechatComment=WechatExec=/home/chenchen/electronic-wechat-master/dist/electronic-wechat-linux-x64/electronic-wechatIcon=/home/chenchen/electronic-wechat-master/dist/electronic-wechat-linux-x64/icon.pngTerminal=falseType=Application# 其中Exec和Icon指向你打包成功的可执行程序和微信icon,保存

接下来进入/usr/share/applications/文件夹,你会发现wechat,拖到桌面即可固定。


原创粉丝点击