я установил Grunt, выполнив следующие команды в терминале:Грунт установлен на Ubuntu, но не работает
sudo apt-get install nodejs
sudo apt-get install npm
npm install -g grunt-cli
Ниже выходного терминала после выполнения npm install -g grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm http 304 https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/resolve
npm http 304 https://registry.npmjs.org/resolve
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/lru-cache
/usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt
[email protected] /usr/local/lib/node_modules/grunt-cli
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])
Грунт должен быть установлен глобально но когда я попробую grunt --version
на терминале, он отображается следующим образом:
/usr/bin/env: node: No such file or directory
Я попытался добавить /usr/local/lib/node_modules/grunt-cli/bin
в ~/.bashrc, но это не поможет.
Даже я пробовал выполнить команду grunt
, перейдя в /usr/local/lib/node_modules/grunt-cli/bin
, но не надеялся.
Пожалуйста, помогите мне.
EDIT: Вот выход sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gyp javascript-common libc-ares-dev libjs-node-uuid libssl-dev libssl-doc
libv8-3.14-dev rlwrap zlib1g-dev
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 261 not upgraded.
Need to get 0 B/684 kB of archives.
After this operation, 3,116 kB of additional disk space will be used.
Selecting previously unselected package nodejs.
(Reading database ... 172429 files and directories currently installed.)
Preparing to unpack .../nodejs_0.10.25~dfsg2-2ubuntu1_amd64.deb ...
Unpacking nodejs (0.10.25~dfsg2-2ubuntu1) ...
Processing triggers for doc-base (0.10.5) ...
Processing 1 added doc-base file...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up nodejs (0.10.25~dfsg2-2ubuntu1) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Вот выход ls -ln
из /usr/local/bin
lrwxrwxrwx 1 0 0 39 Jul 2 00:07 grunt -> ../lib/node_modules/grunt-cli/bin/grunt
lrwxrwxrwx 1 0 0 21 Jul 1 23:50 node -> /usr/local/bin/nodejs
* При установке nodejs я считаю, что это ставит nodejs, но не узел в файле/USR/местные/бен * - Это зависит от того, как * * Вы установили. Я считаю, что пакет Debian/Ubuntu делает это именно так. Установка его из официальных источников вызывает его «узел». – Quentin
Да, уточнил мой пост. – Patosai
symlink не работает, у меня есть обновленный вопрос –