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,或者宝塔文件管理器直接打开。也可以手动修改
分享的几个可用源
- 阿里云的,目前可用,但可能是没同步好,过几天就和官方的同步了,就不行了.
http://mirrors.aliyun.com/debian/ - 163的,部分也404了,但是不影响安装软件,速度也是最快的。
http://mirrors.163.com/debian/ - debian官方的存档
https://snapshot.debian.org/archive/debian/20190321T212815Z/ - 这里面也有不少的
https://www.debian.org/distrib/archive
阿里云给的详细帮助,自己替换相关源的网址即可.
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
文章评论