阿泉的博客

记录生活点滴

解决Debian7和8 在apt-get update时404错误和“无法更新,错误7638D0442B90D010”等问题

update时404问题解决

Debian7和8的官方失效了,其实是进入存档阶段了。导致更新和安装软件失败。需要做的是更改源到存档地址。

Debian7一键解决方法:

cp -r /etc/apt/sources.list /etc/apt/sources.list.bak;echo "deb http://archive.debian.org/debian/ wheezy main contrib non-free" > /etc/apt/sources.list;cat /etc/apt/sources.list;apt-get update;

其实就是把源修改为:
http://archive.debian.org/debian/

/etc/apt/sources.list

, 使用vi /etc/apt/sources.list,或者宝塔文件管理器直接打开。也可以手动修改

阿里云给的详细帮助,自己替换相关源的网址即可.

debian 7.x (wheezy)
编辑/etc/apt/sources.list文件(需要使用sudo), 在文件最前面添加以下条目(操作前请做好相应备份)

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

debian 8.x (jessie)
编辑/etc/apt/sources.list文件(需要使用sudo), 在文件最前面添加以下条目(操作前请做好相应备份)

deb http://mirrors.aliyun.com/debian/ jessie main non-free contrib
deb http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ jessie main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib

无法更新的问题

Debian无法更新,错误7638D0442B90D010

错误:

root@myserver:~# apt-get update
 Get:1 http://security.debian.org wheezy/updates Release.gpg [1571 B]
 Get:2 http://security.debian.org wheezy/updates Release [102 kB]
 Get:3 http://ftp.debian.org wheezy Release.gpg [2390 B]
 ....
 Reading package lists... Done
 W: There is no public key available for the following key IDs:
 9D6D8F6BC857C906
 W: There is no public key available for the following key IDs:
 7638D0442B90D010

解决方案:

apt-get install debian-keyring debian-archive-keyring
apt-get update


Powered By Z-BlogPHP 1.7.4