刚刚在云中购买了一个新的虚拟服务器,Ubuntu14.04。
我用apt-get更新我的包裹。
在试图安装节点js时遇到了问题。我遵循了这个指南:https://github.com/joyent/node/wiki/installing-node.js-via-package-manager
当我运行sudo apt-get install -y nodejs时,我得到以下信息:
user@server sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nodejs : Depends: rlwrap but it is not installable
E: Unable to correct problems, you have held broken packages.这是什么卷纸?我搜索了一下,但没有找到如何安装它。
-更新
我尝试了以下建议。没有成功。我降级到12.04。那里一切正常。
发布于 2015-04-27 13:23:36
我在Ubuntu14.04中也遇到了同样的问题。解决办法:
rlwrap下载http://packages.ubuntu.com/trusty/rlwrap。这是一个直接连接sudo dpkg -i rlwrap_0.34-2_amd64.debsudo apt-get install nodejs发布于 2015-02-26 06:29:49
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"sudo dpkg --configure -a && sudo apt-get update && sudo apt-get -y upgradeapt-缓存显示cache包:cache优先级:可选部分:宇宙/编辑器安装-大小:300个保持器: Ubuntu开发者讨论@lists.ubuntu.com原始-保持器: Francois francois@debian.org体系结构: amd64版本: 0.37-2提供:读行编辑器依赖: libc6 (>= 2.4),libncurses5 (>= 5.7+20100313),pool/universe/r/rlwrap/rlwrap_0.37-2_amd64.deb文件名: libreadline6大小: 80968 MD5sum: 8fca381b84e7205b92615d2d2f6df588 SHA1: ea227d0b53c16cec64f259e349d69073fce972f8 SHA256: readline feature命令行包装器这个包提供了一个小型实用程序,它使用libreadline6库来编辑任何其他命令的键盘输入。每次调用都会记住输入历史记录,每个命令都是分开的;可以在命令行中指定bash和补全字列表中的历史完成和搜索工作。主页:http://utopia.knoware.nl/~hlub/uck/rlwrap/描述-md5: 2dd4e4df63ed824e61c4e21ad05cd1eb Bugs:https://bugs.launchpad.net/ubuntu/+filebug原产地: Ubuntu :edubuntu-桌面-kde,edubuntu-桌面-gnome
发布于 2015-02-26 07:50:08
下面是我在Ubuntu14.04上安装node.js的原因,并解释了为什么我更喜欢以这种方式安装节点。
它涉及添加第三方PPA --它已经被许多人使用,并且似乎是Ubuntu上节点最流行的PPA,运行:
sudo apt-get install python-software-properties+
sudo apt-add-repository ppa:chris-lea/node.jssudo apt-get update+
sudo apt-get install nodejs检查安装
node -v似乎nodejs与Debian和Ubuntu使用的另一个包有冲突,后者也称为“节点”。
例如,如果您在Ubuntu repos中搜索以下内容:
apt-cache search node | grep Amateur您将看到一个名为
节点-业余分组无线节点节目(过渡包)
它是一个古老的火腿无线电包,Debian/Ubuntu在Ubuntu repos和命令行参数中都优先于nodejs。
我可能错了,但我相信Debain/Ubuntu可能已经修改了他们的节点版本,以便使用命令nodejs (通常的命令是node ),以防止两个包之间的冲突。
我从来不打算安装ham无线电版本,所以我选择安装一个非官方版本,我知道它会响应命令node,因为我怀疑如果其他与nodejs相关的程序试图调用node而没有得到响应,破坏的可能性会更高。
https://serverfault.com/questions/670728
复制相似问题