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
打包成功會生成文件夾dist,點擊進入,electronic-wechat就是所需要的可執行程序。
下載一張微信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,拖到桌面即可固定。
以上這篇Ubuntu16.04下安裝Wechat的實現方法就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持武林網。
新聞熱點
疑難解答
圖片精選