我正在尝试安装 Node.jsUbuntu 12.10 https://en.wikipedia.org/wiki/Ubuntu_version_history#Ubuntu_12.10_.28Quantal_Quetzal.29(Quantal Quetzal),但终端向我显示有关丢失包裹的错误。我尝试过这个:
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
,但不知道怎么解决。
只需按照给出的说明进行操作即可here https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os:
安装示例:
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
它在当前稳定的 Ubuntu 上安装当前稳定的 Node。量子
(12.10)用户可能需要安装software-properties-common
包为add-apt-repository
工作命令:sudo apt-get install software-properties-common
从 Node.js v0.10.0 开始,来自 Chris Lea 存储库的 nodejs 包
包括 npm 和 nodejs-dev。
不给sudo apt-get install nodejs npm
. Just sudo apt-get install nodejs
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)