Linux解決軟件包找不到的問題

前言

本週開始接手一個微信小程序的開發,微信小程序須要在微信開發者工具開發。個人Linux在配置環境裏出了問題。
進行微信小程序的配置環境大概有兩步,一是進行wine環境的安裝,一是安裝微信開發者工具,詳情請看[Linux安裝微信開發者工具]。 (https://github.com/cytle/wech...
可是,在一切安裝好後,初始化項目卻啓動不起來。
image.pnggit

解決

一樣是Linux系統,個人小夥伴正常啓動。在原來是咱們兩個安裝的wine版本不對。我決定去安裝一樣的版本,可是卻遇到了問題。
image.png
報錯說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信息,發現有報錯。
image.png
有些地址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文件。
image.png
我把應該修改courses.list文件文件內容誤修改成course.list文件內容,致使未生效。
重新改一下,更新。
再次安裝wine1.6,成功。
image.png小程序

總結

更改一個可靠的安裝源,解決不少版本問題。vim

版權聲明

本文保留全部權利,版權歸河北工業大學夢雲智軟件開發團隊全部。未經團隊及做者事先書面贊成,您不得以任何方式將本文內容進行商業性使用或經過信息網絡傳播本文內容。本文做者:趙凱強segmentfault

相關文章
相關標籤/搜索