哪个版本的npm与nodejs 0.10兼容? [英] What version of npm works with nodejs 0.10?

查看:210
本文介绍了哪个版本的npm与nodejs 0.10兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照说明 http://cartodb.readthedocs进行安装。 org / en / latest / install.html

需要nodejs 0.10才能正常工作。这就是说明中指定的内容:

It requires nodejs 0.10 to work. This is what is specified in the instructions:

sudo add-apt-repository ppa:cartodb/nodejs-010 && sudo apt-get update
sudo apt-get install nodejs 
sudo apt-get install npm

它安装了nodejs 0.10,但在尝试安装npm时却给出了此错误消息:

It install nodejs 0.10 OK, but it gives this error message when trying to install npm:

~$ sudo apt-get install npm
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:
 npm : Depends: nodejs but it is not going to be installed
       Depends: nodejs-dev
       Depends: node-request but it is not going to be installed
       Depends: node-mkdirp but it is not going to be installed
       Depends: node-minimatch but it is not going to be installed
       Depends: node-semver but it is not going to be installed
       Depends: node-ini but it is not going to be installed
       Depends: node-graceful-fs but it is not going to be installed
       Depends: node-abbrev but it is not going to be installed
       Depends: node-nopt but it is not going to be installed
       Depends: node-fstream but it is not going to be installed
       Depends: node-rimraf but it is not going to be installed
       Depends: node-tar but it is not going to be installed
       Depends: node-which but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我认为有一个npm安装与nodejs同时安装:

There is an npm installation that I think was installed at the same time as nodejs:

~$ npm -v
1.4.3

这是NodeJS 0.10的正确npm版本吗?我不确定它是否已经在那里。此apt-cache输出确实更令人担忧,因为它说未安装npm,但我刚刚执行了它:

Is this the right npm version for NodeJS 0.10? I'm not sure if it was there already. This apt-cache output is really more worrying since it says npm is not installed, but I have just executed it:

~$ apt-cache policy npm
npm:
  Installed: (none)
  Candidate: 1.1.4~dfsg-1
  Version table:
     1.1.4~dfsg-1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages

还有其他事情让我觉得此安装有问题。 npm install 在大多数情况下都有效,但是在安装的后期,当尝试安装MAPS API时,出现以下错误:

There's something else that makes me think there is something wrong with this installation. npm install works for the most part, but later on in the installation, when trying to install the MAPS API, I get this errors:

Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
gyp: Call to './util/has_cairo_freetype.sh' returned exit status 0.
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/raquel/Windshaft-cartodb/node_modules/windshaft/node_modules/canvas
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm http GET https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz
npm http GET https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz
npm http 200 https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz
npm http 200 https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz
npm http GET https://github.com/CartoDB/carto/archive/master.tar.gz
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/home/raquel/Windshaft-cartodb/node_modules/windshaft/node_modules/carto/node_modules/mapnik-reference'
npm ERR! error rolling back  windshaft@0.51.0 { [Error: ENOTEMPTY, rmdir '/home/raquel/Windshaft-cartodb/node_modules/windshaft/node_modules/carto/node_modules/mapnik-reference']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: '/home/raquel/Windshaft-cartodb/node_modules/windshaft/node_modules/carto/node_modules/mapnik-reference' }
npm ERR! canvas@1.2.7-cdb1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the canvas@1.2.7-cdb1 install script.
npm ERR! This is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls canvas
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.13.0-32-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/raquel/Windshaft-cartodb
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE

如果我做 sudo apt-,我可以摆脱这个错误。获取安装libpango1.0-dev 并使用 npm install 重新安装,但是我不确定这是否只是黑客,我

I can get rid of that error if I do sudo apt-get install libpango1.0-dev and re-install with npm install, but I'm not sure if this is just a hack and I've done something wrong earlier by not installing the correct npm version.

推荐答案

以下是完整列表(介于v0.10.0-v0之间)。 10.40):

Here's the complete list (between v0.10.0 - v0.10.40):


  • 节点v0.10.0-> npm v1.2.14

  • 节点v0.10.1 -> npm v1.2.15

  • 节点v0.10.2-> npm v1.2.15

  • 节点v0.10.3-> npm v1.2.17

  • 节点v0.10.4-> npm v1.2.18

  • 节点v0.10.5-> npm v1.2.18

  • 节点v0.10.6-> npm v1.2.18

  • 节点v0.10.7-> npm v1.2.21

  • 节点v0.10.8-> npm v1.2.23

  • 节点v0.10.9-> npm v1.2.24

  • 节点v0.10.10-> npm v1.2.25

  • 节点v0.10.11-> npm v1.2.30

  • 节点v0.10.12-> npm v1.2.32

  • 节点v0 .10.13-> npm v1.3.2

  • 节点v0.10.14-> npm v1.3.5

  • 节点v0.10.15-> npm v1.3.5

  • 节点v0.10.16-> npm v1.3.8

  • 节点v0.10.17-> npm v1.3.8

  • 节点v0 .10.18-> npm v1.3.8

  • 节点v0.10.19-> npm v1.3.11

  • 节点v0.10.20-> npm v1.3.11

  • 节点v0.10.21-> npm v1.3.11

  • 节点v0.10.22-> npm v1.3.14

  • 节点v0.10.23-> npm v1.3.17

  • 节点v0.10.24-> npm v1.3.21

  • 节点v0.10.25- > npm v1.3.24

  • 节点v0.10.26-> npm v1.4.3

  • 节点v0.10.27-> npm v1.4.8

  • 节点v0.10.28-> npm v1.4.9

  • 节点v0.10.29-> npm v1.4.14

  • 节点v0.10.30-> npm v1.4.21

  • 节点v0.10.31-> npm v1.4.23

  • 节点v0.10.32-> npm v1 .4.28

  • 节点v0.10.33-> npm v1.4.28

  • 节点v0.10.34-> npm v1.4.28

  • 节点v0.10.35-> npm v1.4.28

  • 节点v0.10.36-> npm v1.4.28

  • 节点v0.10.37-> npm v1.4.28

  • 节点v0.10.38-> npm v1.4.28

  • 节点v0.10.39-> npm v1.4.28

  • 节点v0.10.40-> npm v1.4.28

  • node v0.10.0 -> npm v1.2.14
  • node v0.10.1 -> npm v1.2.15
  • node v0.10.2 -> npm v1.2.15
  • node v0.10.3 -> npm v1.2.17
  • node v0.10.4 -> npm v1.2.18
  • node v0.10.5 -> npm v1.2.18
  • node v0.10.6 -> npm v1.2.18
  • node v0.10.7 -> npm v1.2.21
  • node v0.10.8 -> npm v1.2.23
  • node v0.10.9 -> npm v1.2.24
  • node v0.10.10 -> npm v1.2.25
  • node v0.10.11 -> npm v1.2.30
  • node v0.10.12 -> npm v1.2.32
  • node v0.10.13 -> npm v1.3.2
  • node v0.10.14 -> npm v1.3.5
  • node v0.10.15 -> npm v1.3.5
  • node v0.10.16 -> npm v1.3.8
  • node v0.10.17 -> npm v1.3.8
  • node v0.10.18 -> npm v1.3.8
  • node v0.10.19 -> npm v1.3.11
  • node v0.10.20 -> npm v1.3.11
  • node v0.10.21 -> npm v1.3.11
  • node v0.10.22 -> npm v1.3.14
  • node v0.10.23 -> npm v1.3.17
  • node v0.10.24 -> npm v1.3.21
  • node v0.10.25 -> npm v1.3.24
  • node v0.10.26 -> npm v1.4.3
  • node v0.10.27 -> npm v1.4.8
  • node v0.10.28 -> npm v1.4.9
  • node v0.10.29 -> npm v1.4.14
  • node v0.10.30 -> npm v1.4.21
  • node v0.10.31 -> npm v1.4.23
  • node v0.10.32 -> npm v1.4.28
  • node v0.10.33 -> npm v1.4.28
  • node v0.10.34 -> npm v1.4.28
  • node v0.10.35 -> npm v1.4.28
  • node v0.10.36 -> npm v1.4.28
  • node v0.10.37 -> npm v1.4.28
  • node v0.10.38 -> npm v1.4.28
  • node v0.10.39 -> npm v1.4.28
  • node v0.10.40 -> npm v1.4.28

我建议您可以使用 n nvwm 虽然。您不必担心其中任何一个的版本。

I recommend you to use n or nvwm though. You don't have to worry about the versions with either of them.

这篇关于哪个版本的npm与nodejs 0.10兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆