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.