根据官方文档:
sudo apt-get update sudo apt-get install python-software-properties python g++ make sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs
It installs current stable Node on the current stable Ubuntu. Quantal (12.10) users may need to install the software-properties-common package for the add-apt-repository command to work: sudo apt-get install software-properties-common
安装 software-properties-common
时出现 Size mismatch
错误:
Failed to fetch http://ubuntu.mirrors.ucloud.cn/ubuntu/pool/main/s/software-properties/software-properties-common_0.82.7.3_all.deb Size mismatch E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
尝试更新源(sudo apt-get update
)时则出现以下错误:
Reading package lists... Done W: GPG error: http://ubuntu.mirrors.ucloud.cn precise InRelease: File /var/lib/apt/lists/partial/ubuntu.mirrors.ucloud.cnubuntudistspreciseInRelease doesn't start with a clearsigned message W: GPG error: http://ubuntu.mirrors.ucloud.cn precise-updates InRelease: File /var/lib/apt/lists/partial/ubuntu.mirrors.ucloud.cnubuntudistsprecise-updatesInRelease doesn't start with a clearsigned message W: GPG error: http://ubuntu.mirrors.ucloud.cn precise-backports InRelease: File /var/lib/apt/lists/partial/ubuntu.mirrors.ucloud.cnubuntudistsprecise-backportsInRelease doesn't start with a clearsigned message W: GPG error: http://ubuntu.mirrors.ucloud.cn precise-security InRelease: File /var/lib/apt/lists/partial/ubuntu.mirrors.ucloud.cnubuntudistsprecise-securityInRelease doesn't start with a clearsigned message
相关信息
Ubuntu 12.04 64位
求解决
源里的数据有问题,换个源试试,比如sohu的。昨晚我用163的源也遇到类似问题来着。