編碼的世界 / 優質文選 / 女人

ubuntu更新源apt-get


2022年7月23日
-   

在用ubuntu安裝一些軟件的時候通常用到apt-get命令,去獲取安裝軟件,但有時候自己機器中的apt-get中的軟件下載服務器在國外
這樣導致無法下載安裝,所以一般都換為國內的安裝源下面是更新源的步驟
打開。。sudo gedit /etc/apt/sources.list
替換。。。。
#deb cdrom:[Ubuntu 17.04 _Zesty Zapus_ - Release i386 (20170412)]/ zesty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ zesty main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ zesty-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty-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://cn.archive.ubuntu.com/ubuntu/ zesty universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty universe
deb http://cn.archive.ubuntu.com/ubuntu/ zesty-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty-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://cn.archive.ubuntu.com/ubuntu/ zesty multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ zesty-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty-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://cn.archive.ubuntu.com/ubuntu/ zesty-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ zesty-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 zesty partner
# deb-src http://archive.canonical.com/ubuntu zesty partner
deb http://security.ubuntu.com/ubuntu zesty-security main restricted
# deb-src http://security.ubuntu.com/ubuntu zesty-security main restricted
deb http://security.ubuntu.com/ubuntu zesty-security universe
# deb-src http://security.ubuntu.com/ubuntu zesty-security universe
deb http://security.ubuntu.com/ubuntu zesty-security multiverse
# deb-src http://security.ubuntu.com/ubuntu zesty-security multiverse
然後更新sudo apt-get update
(要有網絡啊)
第二種
sudo apt-get update
deb
http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##測試版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源碼
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##測試版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Canonical 合作夥伴和附加
deb http://archive.canonical.com/ubuntu/ xenial partner deb http://extras.ubuntu.com/ubuntu/ xenial main

熱門文章