Я пытаюсь установить CartoDD в соответствии с инструкциями http://cartodb.readthedocs.org/en/latest/install.htmlКакая версия npm работает с nodejs 0.10?
Для работы требуется nodejs 0,10. Это то, что указано в инструкции:
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 ОК, но это дает сообщение об ошибке при попытке установить НПМ:
~$ 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:
~$ npm -v
1.4.3
Является ли это подходящей версией npm для NodeJS 0.10? Я не уверен, что он уже там. Этот вывод APT-кэша действительно больше беспокоиться, так как он говорит, НПМ не установлен, но я только что выполнил его:
~$ 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
работы по большей части, но позже в установке, при попытке установить API MAPS, я получаю эту ошибку:
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 [email protected] { [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! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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-get install libpango1.0-dev
и повторно установить с npm install
, но я не уверен, что это просто хак, и я сделал что-то неправильно раньше, не установив правильную версию npm.
Большое спасибо за ваш ответ! Мне также было интересно ... откуда вы взяли этот список? – zapatilla
Ха-ха, я ожидал этого. Во-первых, я просмотрел заметки о выпуске. Итак, я просто установил все версии nodes.js и проверил их версии на npm. И удалили все версии node.js с помощью команды 'n rm 0.10. *'. –
Ничего себе, спасибо большое :) Это действительно полезно. – zapatilla