设置debian6源

debian6真的太老了,个人喜欢追新,因为新版本用起来少很多乱七八糟的问题,不过线上有机器跑的这个版本,SO...

1、修改源文件,注释掉不可用的源,添加可用的源

# vim /etc/apt/sources.list
deb http://archive.debian.org/debian squeeze main
deb http://archive.debian.org/debian squeeze-lts main

2、更新软件包信息库

# aptitude update

软件包是通过一个数据库来管理的,通过这个数据库中的信息可跟踪你的系统中已安装、未安装和现在可安装的软件包信息。

3、更新包信息的时候经常会遇到There is no public key available for the following key IDs的问题,解决办法:

# apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 7638D0442B90D010

其实还有一个一劳永逸办法,直接安装keyring包,将多数key问题解决在摇篮

# apt search keyring
debian-archive-keyring/stable,now 2017.5 all [installed]
  GnuPG archive keys of the Debian archive
debian-keyring/stable,now 2017.05.28 all [installed]
  GnuPG keys of Debian Developers and Maintainers

# aptitude install -y debian-keyring debian-archive-keyring
# apt-key update              - update keys using the keyring package

4、再次更新,直到更新成功,更新完成后就可以安装软件包了

# aptitude update
# aptitude install -y nagios-nrpe-plugin
# puppet agent -t
posted @ 2017-08-06 02:18  KeithTt  阅读(1595)  评论(0编辑  收藏  举报