debian squeeze upgrade to wheezy online 2016-06-11 @ DOCS apt-getaptitudedebian6debian7no public key availablesqueezewheezy
在AOYOU VPS上买了个vps(XenSystem)
默认只有debian6系统模版
想装nodejs玩玩express,apt-get是肯定没有的,编译安装提示g++版本太低没法编译。
本来系统也只是装个shadowsocks所以干脆把系统升级了
一、参考文档
[1] Debian 6(Squeeze)升級至Debian 7(Wheezy)
[2] “no public key available” on apt-get update
[3] Apt-Pinning for Beginners
二、apt-get update
按照参考文档1中 先把apt-get source.list 更新了
deb http://ftp.us.debian.org/debian/ wheezy main deb-src http://ftp.us.debian.org/debian/ wheezy main deb http://security.debian.org/ wheezy/updates main deb-src http://security.debian.org/ wheezy/updates main deb http://ftp.us.debian.org/debian/ wheezy-updates main deb-src http://ftp.us.debian.org/debian/ wheezy-updates main
apt-get update一般都会遇到 参考文档2中提到的public key问题
可以先尝试apt-key update一下看能否解决,如果不能解决,就用参考文档2中提到的aptitude install debian-keyring debian-archive-keyring来处理public key的问题
三、开始升级
apt-get update apt-get upgrade apt-get dist-upgrade reboot
其中可能会出现问题的一般是第三步,会出现包依赖和冲突问题,可以先把有问题的包先卸载了升级完成后再安装。
四、升级完后续操作
#版本检查 lsb_release -a cat /etc/debian_version #檢查核心 uname -msr #清理包 apt-get autoremove apt-get autoclean #apt-get install 之前因为冲突先卸载的包
五、备选方案
仍然需要先把apt-get的source.list先更新了
aptitude方法:简单省事
aptitude update aptitude install nodejs/wheezy
apt-pinning方法:稍微复杂些
参考文档3,先创建/编辑 /etc/apt/preferences
Package: * Pin: release n=wheezy Pin-Priority: 900
然后apt-get update、apt-get install xxx即可。
下一篇: 信天游《大雁雁回来又开了春》
上一篇: 双机热备:file篇
暂无评论