我试图在Ubuntu 12.10 (Quantal Quetzal)上安装Node.js,但终端显示了一个关于丢失包的错误。我试过这样做:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
但是当我来到最后一行sudo apt-get install nodejs npm
显示这个错误:
Failed to install some packages. This may mean that
you requested an impossible situation or if you are using the distribution
distribution that some required packages have not yet been created or been
been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nodejs: Conflicts: npm
E: Failed to correct problems, you have held broken packages.
然后我卸载了ppa:chris-lea/node.js
,我正在尝试第二种选择:
sudo apt-get install node.js
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
同样的错误,终端显示npm is the latest version
,但它也显示了我在顶部显示的文本。我认为问题是ppa:chris-lea/node.js
,但我不知道如何解决它。