Ubuntu12.04 update source

Source: Internet
Author: User
Tags aliyun

Ubuntu12.04 update source
When the ubuntu source is used for apt-get install, the corresponding software (guess) will be searched based on the url in the source. Therefore, the source configuration determines the speed of your software update, can I even find the corresponding command (I just remembered to update it when I installed a command and found 404 ).
The source information of the current system is saved in the/etc/apt/sources. list file. For example, the source information of the current system (which should be used by default in ubuntu 12 ):

terryu@ubuntu:~/workplace/tbnet/trunk/tbsys$ grep -v "^#" /etc/apt/sources.list | grep -v "^$"deb http://cn.archive.ubuntu.com/ubuntu/ precise main restricteddeb-src http://cn.archive.ubuntu.com/ubuntu/ precise main restricteddeb http://cn.archive.ubuntu.com/ubuntu/ precise-updates main restricteddeb-src http://cn.archive.ubuntu.com/ubuntu/ precise-updates main restricteddeb http://cn.archive.ubuntu.com/ubuntu/ precise universedeb-src http://cn.archive.ubuntu.com/ubuntu/ precise universedeb http://cn.archive.ubuntu.com/ubuntu/ precise-updates universedeb-src http://cn.archive.ubuntu.com/ubuntu/ precise-updates universedeb http://cn.archive.ubuntu.com/ubuntu/ precise multiversedeb-src http://cn.archive.ubuntu.com/ubuntu/ precise multiversedeb http://cn.archive.ubuntu.com/ubuntu/ precise-updates multiversedeb-src http://cn.archive.ubuntu.com/ubuntu/ precise-updates multiversedeb http://cn.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiversedeb-src http://cn.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiversedeb http://security.ubuntu.com/ubuntu precise-security main restricteddeb-src http://security.ubuntu.com/ubuntu precise-security main restricteddeb http://security.ubuntu.com/ubuntu precise-security universedeb-src http://security.ubuntu.com/ubuntu precise-security universedeb http://security.ubuntu.com/ubuntu precise-security multiversedeb-src http://security.ubuntu.com/ubuntu precise-security multiverse



New grep usage: ^ is used to match the beginning of a row.-v indicates that the row that does not contain the specified string is used as the row that meets the condition. $ is used to match the end of a row.
Try Alibaba's source now
deb http://mirrors.aliyun.com/ubuntu/ utopic main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ utopic-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ utopic-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ utopic-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ utopic-backports main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ utopic main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ utopic-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ utopic-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ utopic-proposed main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ utopic-backports main restricted universe multiverse



New command: sudo sed-I's/^/# &/G'/etc/apt/sources. THE list command can be added at the beginning of each line of the specified file #. Currently, it can be replaced with any content. You can add a new source after commenting on all the source information. However, you have to try again. What will happen if this file does not store any information?
Run the sudo apt-get update command to update the source, and then try to install a software. The following error occurs:
terryu@ubuntu:~/workplace/tbnet/trunk/tbsys$ sudo apt-get install makeReading package lists... DoneBuilding dependency treeReading state information... DonePackage make is not available, but is referred to by another package.This may mean that the package is missing, has been obsoleted, oris only available from another source


E: Package 'make' has no installation candidate
Haha, the source is very important for apt-get. Now we try to use Alibaba's source, and the update speed is quite fast. Get: 110 http://mirrors.aliyun.com utopic-backports/restricted Translation-en [14 B]
Get: 111 http://mirrors.aliyun.com utopic-backports/universe Translation-en [6,694 B]
Fetched 30.1 MB in 1 min 16 s (394 kB/s)
Reading package lists... Done
After update is complete, execute the apt-get install operation to quickly complete the operation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.