Changing the Alibaba Cloud image in the Debian environment solves the problem that the source cannot be updated.

Source: Internet
Author: User
Tags vps vps server aliyun
Whether we are preparing to install the WEB environment on the VPS server or compile other software functions, after logging on to SSH through VPS, we must first update the environment so that the source on the server is up to date and the patch is up to date. Today, an error message is displayed when apt-get update is used to update the source in a Debian environment. Then, you cannot directly install the required software through apt-get (I need to install SQLITE ).

 

 

From the figure above, we can see that the source fails or is invalid, so "E: Some index files failed to download, they have been ignored, or old ones used instead. "Error prompt, how can we solve the problem?

 

If we are also in the Debian environment, we can modify the Alibaba Cloud source to solve this problem. Of course, there are other sources such as 163. If our users don't care, they can use the old ones.

 

1. Replace files

 

The code is as follows: Copy code

/Etc/apt/sources. list

 

2. Replace the source content

 

The code is as follows: Copy code

Deb http://mirrors.aliyun.com/debian wheezy main contrib non-free
Deb-src http://mirrors.aliyun.com/debian wheezy main contrib non-free
Deb http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free
Deb-src http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free
Deb http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free
Deb-src http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free

 

We replace all the content of sources. list with the above Alibaba Cloud source, and then re-apt-get update-y to complete the update.

 

 

If no error message is displayed, the problem is resolved.

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.