K
K
Kirill Gorlov2015-07-26 17:39:01
linux
Kirill Gorlov, 2015-07-26 17:39:01

How to run npm install under ubuntu 15?

Installed nodejs
Installed npm
I want to run a Node server for a directory.
It asks to install dependencies via NPM, I
run the command sudo npm install -g
in response, the terminal swears

-
> [email protected] postinstall /usr/local/lib/node_modules/angular-phonecat
> bower install

/usr/bin/env: node: Нет такого файла или каталога
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
 
npm ERR! [email protected] postinstall: `bower install`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is most likely a problem with the angular-phonecat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     bower install
npm ERR! You can get their info via:
npm ERR!     npm owner ls angular-phonecat
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.19.0-23-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g"
npm ERR! cwd /home/lis/angular/angular-phonecat
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/lis/angular/angular-phonecat/npm-debug.log
npm ERR! not ok code 0

from the message it is clear that the node package is not enough for him - I put
sudo apt-get install node
everything fine at the beginning - at the end he swears
Выбор ранее не выбранного пакета node.
(Чтение базы данных … на данный момент установлено 244887 файлов и каталогов.)
Подготовка к распаковке …/node_0.3.2-7.4_all.deb …
Распаковывается node (0.3.2-7.4) …
Обрабатываются триггеры для man-db (2.7.0.2-5) …
Настраивается пакет node (0.3.2-7.4) …

here and how to be?
Installed readable Ubuntu specifically for Node.js and now it doesn't want to work
Ubuntu version 15 x32

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sim3x, 2015-07-26
@Chetson

Never install through make install
If there is absolutely no way and you need to use software, just do make and use the full path to the binary
And the node must be installed in this way
Before building, you need to delete what you putmake install

locate node
locate nodejs
locate npm

Потом по данному ману
В чем разница между node и nodejs?

S
Sergey Pashkevich, 2015-07-26
@siarheipashkevich

Попробуйте выполнить эту команду:
Попробуйте заново установить NodeJS из репозитория:

sudo add-apt-repository ppa:chris-lea/node.js 
sudo apt-get update
sudo apt-get install nodejs

И покажите, что выведут эти две команды:
node -v
npm -v

Кирилл Горлов, 2015-07-26
@Chetson Автор вопроса

Да - на такое тоже нарывался - сделал, но проблему не решило
ответ таков

/
> [email protected] postinstall /usr/local/lib/node_modules/angular-phonecat
> bower install


Error: EACCES, permission denied '/home/lis/.config/configstore/bower-github.yml'
You don't have access to this file.

    at Object.fs.openSync (evalmachine.<anonymous>:432:18)
    at Object.fs.readFileSync (evalmachine.<anonymous>:286:15)
    at Object.create.all.get (/usr/local/lib/node_modules/bower/node_modules/configstore/index.js:34:29)
    at Object.Configstore (/usr/local/lib/node_modules/bower/node_modules/configstore/index.js:27:44)
    at readCachedConfig (/usr/local/lib/node_modules/bower/lib/config.js:22:23)
    at defaultConfig (/usr/local/lib/node_modules/bower/lib/config.js:11:24)
    at Object.<anonymous> (/usr/local/lib/node_modules/bower/lib/index.js:40:32)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
 
npm ERR! [email protected] postinstall: `bower install`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is most likely a problem with the angular-phonecat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     bower install
npm ERR! You can get their info via:
npm ERR!     npm owner ls angular-phonecat
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.19.0-23-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g"
npm ERR! cwd /home/lis/angular/angular-phonecat
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/lis/angular/angular-phonecat/npm-debug.log
npm ERR! not ok code 0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question