本週開始接手一個微信小程序的開發,微信小程序須要在微信開發者工具開發。個人Linux在配置環境裏出了問題。
進行微信小程序的配置環境大概有兩步,一是進行wine環境的安裝,一是安裝微信開發者工具,詳情請看[Linux安裝微信開發者工具]。 (https://github.com/cytle/wech...
可是,在一切安裝好後,初始化項目卻啓動不起來。git
一樣是Linux系統,個人小夥伴正常啓動。在原來是咱們兩個安裝的wine版本不對。我決定去安裝一樣的版本,可是卻遇到了問題。
報錯說wine的1.6版本包沒有找到。
緣由是從當前源裏找不到。這裏咱們就須要配置咱們的源。咱們知道,Ubuntu使用apt
來管理軟件包,apt
將軟件庫存儲在/etc/apt/sources.list
和/etc/apt/sources.list.d/
目錄中帶.list
後綴的文件中.
咱們經過sudo gedit /etc/apt/sources.list
命令編輯/etc/apt/sources.list
文件。gedit是Linux的一個編輯器,相似於咱們的vim,咱們用gedit打開相應文件。
而後將咱們的阿里源添加到文件首部github
#添加阿里源 deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
保存退出
而後更新web
sudo apt-get update
咱們再次執行安裝wine1.6命令,仍是報相同的錯誤。我翻了翻上面的sudo apt-get update
信息,發現有報錯。
有些地址404。上網查一下,原來是網址對一些舊的烏班圖版本已棄用,最好解決辦法是更新烏班圖版本。
對我來講不太行,還要尋找別的解決辦法。
既然阿里的源不能使用,國內還有一些別的源供咱們使用,去網上搜了一個163的源ubuntu
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
修改,更新。
怎麼又報原來的錯誤,阿里的源404。看來有地方錯了。檢查一番後發現,原來改錯地址了。有一個course.list文件,courses.list文件。
我把應該修改courses.list文件文件內容誤修改成course.list文件內容,致使未生效。
重新改一下,更新。
再次安裝wine1.6,成功。小程序
更改一個可靠的安裝源,解決不少版本問題。vim
本文保留全部權利,版權歸河北工業大學夢雲智軟件開發團隊全部。未經團隊及做者事先書面贊成,您不得以任何方式將本文內容進行商業性使用或經過信息網絡傳播本文內容。本文做者:趙凱強。segmentfault