本周开始接手一个微信小程序的开发,微信小程序须要在微信开发者工具开发。个人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