ubuntu更换软件源方法和实验成功软件源地址
生活随笔
收集整理的這篇文章主要介紹了
ubuntu更换软件源方法和实验成功软件源地址
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
ubuntu更換軟件源方法
轉(zhuǎn)載部分內(nèi)容:
這些bionic、main、restricted、universe、multiverse是什么意思呢,該怎么修改才對(duì),實(shí)在是讓人頭大。簡單了解一下:bionic是指你的ubuntu版本代號(hào),可以用 lsb_release -c 命令查看: ubuntu 12.04 代號(hào)為precise ubuntu 14.04 代號(hào)為trusty ubuntu 15.04 代號(hào)為vivid ubuntu 15.10 代號(hào)為wily ubuntu 16.04 代號(hào)為xenial ubuntu18.04 代號(hào)為bionic 如果不注意這個(gè),可能拷貝別人的sources.list文件對(duì)應(yīng)的ubuntu版本和你的不一樣,就出錯(cuò)了main、restricted、universe、multiverse的意義是: main 即“基本”組件,其中只包含符合Ubuntu的協(xié)議要求并由Ubuntu團(tuán)隊(duì)維護(hù)支持的軟件。 restricted 即“受限”組件,其中包含了非常重要的,但并不具有合適的自由協(xié)議的軟件,如顯卡驅(qū)動(dòng),同樣有 ubuntu團(tuán)隊(duì)維護(hù)支持。 universe 即“社區(qū)維護(hù)”組件,其中包含的軟件種類繁多,它們可能采用受限于協(xié)議,可能不是,但都不為ubuntu 團(tuán)隊(duì)維護(hù)。 multiverse 即“非自由”組件,其中包括了不符合自由軟體要求而且不被Ubuntu團(tuán)隊(duì)支援的軟件,通常為商業(yè)公司編寫的軟件。其實(shí)不必了解他們的具體含義,最好的方法就是不改動(dòng)它們,保持原樣,只改動(dòng)url部分,觀察到我的sources.list中,url均為:http://ports.ubuntu.com/ubuntu-ports 那么改為阿里云的鏡像節(jié)點(diǎn)URL就行了: http://mirrors.aliyun.com/ubuntu/可是改了以后,apt update仍然出現(xiàn)了很多404錯(cuò)誤,查看錯(cuò)誤信息才發(fā)現(xiàn)阿里云的鏡像節(jié)點(diǎn) http://mirrors.aliyun.com/ubuntu/ 只包含x86 x64的bin,并不包含arm的bin,怎么會(huì)這樣呢,難道阿里云偷懶了嗎?只拷貝了PC版ubuntu需要的包? 后來才發(fā)現(xiàn)不是這樣的,是URL路徑不對(duì),應(yīng)該改為 http://mirrors.aliyun.com/ubuntu-ports重點(diǎn) 所以,直接生搬硬套copy網(wǎng)上的資料,是有可能會(huì)出問題的,最好,最簡單,最靠譜的辦法,就是打開你原本的/etc/apt/sources.list 只替換其中的host部分,其它部分一個(gè)字符都不要?jiǎng)?sudo vim /etc/apt/sources.list :%s/ports.ubuntu.com/mirrors.aliyun.com/g :wq sudo apt updateperfect !實(shí)驗(yàn)總結(jié)
實(shí)驗(yàn)成功的ubuntu軟件源地址
裝過完好ROS Kinetic 的ubuntu1604的軟件源【http://mirrors.aliyun.com/ubuntu/電腦格式】
# deb cdrom:[Ubuntu 16.04.7 LTS _Xenial Xerus_ - Release amd64 (20200806)]/ xenial main restricted# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted## Major bug fix updates produced after the final release of the ## distribution. deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://mirrors.aliyun.com/ubuntu/ xenial universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu xenial partner # deb-src http://archive.canonical.com/ubuntu xenial partnerdeb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe # deb-src http://security.ubuntu.com/ubuntu xenial-security universe deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse樹莓派ubuntu mate軟件源【http://mirrors.aliyun.com/ubuntu-ports 其余不要?jiǎng)印?/h3>
原始軟件源地址未變的情況下更換方法
sudo vim /etc/apt/sources.list :%s/ports.ubuntu.com/mirrors.aliyun.com/g :wq sudo apt update換源更新成功
成功安裝gedit
總結(jié)
以上是生活随笔為你收集整理的ubuntu更换软件源方法和实验成功软件源地址的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux常用编辑器使用:vi、vim、
- 下一篇: sudo apt-get update后