Ubuntu16.04下安装Wechat的实现方法
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 repository cd electronic-wechat-master # Install dependencies and run the app npm install && npm start 编译中可能会遇到的一些问题 首先保证已安装nodejs,npm !!! 如果编译失败,在文件夹npm-debug.log会显示报错信息,我这里遇到了nodejs和npm版本过低的问题 解决方式如下: 更新ubuntu软件源 sudo apt-get update sudo 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.js sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list 安装nodejs sudo apt-get install nodejs sudo apt install nodejs-legacy sudo apt install npm 安装成功后,继续按照wiki编译源码,成功后会弹出wechat登录框 编译成功后将微信固定在桌面 先将源码打包 cd electronic-wechat-master npm run build:osx npm run build:linux npm run build:win32 npm run build:win64 打包成功会生成文件夹dist,点击进入,electronic-wechat就是所需要的可执行程序。 下载一张微信icon图片放到该文件夹下 # 设置wechat路径及icon sudo gedit /usr/share/applications/wechat.desktop # 弹出文本,输入 [Desktop Entry] Name=Wechat Comment=Wechat Exec=/home/chenchen/electronic-wechat-master/dist/electronic-wechat-linux-x64/electronic-wechat Icon=/home/chenchen/electronic-wechat-master/dist/electronic-wechat-linux-x64/icon.png Terminal=false Type=Application # 其中Exec和Icon指向你打包成功的可执行程序和微信icon,保存 接下来进入/usr/share/applications/文件夹,你会发现wechat,拖到桌面即可固定。 以上这篇Ubuntu16.04下安装Wechat的实现方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持编程小技巧。 (编辑:台州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |