Nodejs:取决于:rlwrap,但它不是可安装的

刚刚在云端Ubuntu 14.04上购买了新的虚拟服务器。

我用apt-get update更新了我的软件包。

尝试安装节点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. 

什么是rlwrap? 我GOOGLE了,但没有find如何安装它。

更新

我尝试了下面的build议。 没有成功。 我降级到12.04。 一切工作在那里。

我在Ubuntu 14.04中遇到了同样的问题。 解决scheme:

  1. http://packages.ubuntu.com/trusty/rlwrap下载rlwrap 。 这是一个直接链接
  2. 安装它sudo dpkg -i rlwrap_0.34-2_amd64.deb
  3. 安装nodejs sudo apt-get install nodejs
  1. 启用宇宙存储库sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
  2. 修复和更新sudo dpkg --configure -a && sudo apt-get update && sudo apt-get -y upgrade
  3. 再次尝试(请注意,node.js指令用自定义指令代替Ubuntu存储库,因此请确保脚本工作)
 >apt-cache show rlwrap Package: rlwrap Priority: optional Section: universe/editors Installed-Size: 300 Maintainer: Ubuntu Developers <[email protected]> Original-Maintainer: Francois Marier <[email protected]> Architecture: amd64 Version: 0.37-2 Provides: readline-editor Depends: libc6 (>= 2.4), libncurses5 (>= 5.7+20100313), libreadline6 (>= 6.0) Filename: pool/universe/r/rlwrap/rlwrap_0.37-2_amd64.deb Size: 80968 MD5sum: 8fca381b84e7205b92615d2d2f6df588 SHA1: ea227d0b53c16cec64f259e349d69073fce972f8 SHA256: 09d5d948a387f77a1f09b8ad800a73349dbcd6245f787496e0f1743df5259ea4 Description-en: readline feature command line wrapper This package provides a small utility that uses the GNU readline library to allow the editing of keyboard input for any other command. Input history is remembered across invocations, separately for each command; history completion and search work as in bash and completion word lists can be specified on the command line. Homepage: http://utopia.knoware.nl/~hlub/uck/rlwrap/ Description-md5: 2dd4e4df63ed824e61c4e21ad05cd1eb Bugs: https://bugs.launchpad.net/ubuntu/+filebug Origin: Ubuntu Task: edubuntu-desktop-kde, edubuntu-desktop-gnome 

下面是我在Ubuntu 14.04上安装node.js的一些工作,以及为什么我更喜欢用这种方式安装节点。
它涉及添加一个第三方PPA – 已被许多人使用,似乎是Ubuntu上最受欢迎的PPA节点运行:

 sudo apt-get install python-software-properties 

+

 sudo apt-add-repository ppa:chris-lea/node.js 

+

 sudo apt-get update 

+

 sudo apt-get install nodejs 

检查安装

 node -v 

背景

看来nodejs与Debian和Ubuntu使用的另一个软件包(也称为“node”)有冲突,

例如,如果您searchUbuntu回购:

 apt-cache search node | grep Amateur 

你会看到一个包叫

节点 – 业余分组无线电节点程序(过渡包)

它是一个古老的火腿收音机软件包,Debian / Ubuntu在Ubuntu回购站命令行参数中都优先于nodejs。
我可能是错的,但我相信Debain / Ubuntu可能已经修改了他们的节点版本,以使用命令nodejs ,其中正常的命令是node ,以防止这两个包之间的冲突。
我从来没有计划安装火腿收音机版本,所以我select安装一个非官方版本,我知道它会响应命令node ,因为我怀疑如果其他nodejs相关程序试图破坏的可能性会更高打个电话给node ,不要得到回应。

谁试图安装节点在Ubuntu的生动(Ubuntu的平板电脑):按照@ bekce的解决scheme,只有你需要关注你的机器的架构。 我的平板电脑是armhf ,所以我从armhf下载armhf

 wget https://launchpad.net/ubuntu/+source/rlwrap/0.41-1 

剩下的是一样的:

 sudo dpkg -i rlwrap_0.34-2_amd64.deb sudo apt-get install nodejs