*

*

EDIT: As of December 2018, this is no longer the correct way. See the other two answers.

Bạn đang xem: Cannot install nodejs usr bin env node no such file or directory

You need to symlinks the nodejs executable to lớn node suvì chưng ln -s "$(which nodejs)" /usr/local/bin/node The reason for this is that when you vì chưng "apt-get install node", it installs an unrelated package, so they had lớn choose a different name so it wouldn"t conflict


*

While the accepted answer fixes the problem, the correct way to lớn vì that, at least with Debian Jessie & forward and Ubuntu 14.4 & forward1 is to install nodejs-legacy:

apt-get install nodejs-legacyThe reason is that Debian already had a package (node) providing /usr/bin/node, and the nodejs node binary had khổng lồ be installed into lớn /usr/bin/nodejs.

The nodejs-legacy package provides a symbolic links from /usr/bin/nodejs khổng lồ /usr/bin/node (và conflicts with the node package).

Xem thêm: Hướng Dẫn Cách Tạo Mục Lục Tự Động Trong Word 2010, 2013, 2016, 2019 Nhanh

Source: Resolution of node/nodejs conflict & Debian bug #614907: node: name conflicts with node.js interpreter


*

It"s better if you update to lớn the lachạy thử node version

suvày npm cabịt clean -f suvì chưng npm install -g nsuvì n stable
*

Thanks for contributing an answer to lớn Stack Overflow!

Please be sure to lớn answer the question. Provide details and nói qua your research!

But avoid

Asking for help, clarification, or responding lớn other answers.Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.


Post Your Answer Discard

By clicking “Post Your Answer”, you agree khổng lồ our terms of service, privacy policy and cookie policy


Not the answer you're looking for? Browse other questions tagged node.js forever or ask your own question.


'node --no-deprecation': No such file or directory when running global npm comm& in ubuntu docker container
site design / logo sản phẩm © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.9.10.40187


Your privacy

By clicking “Accept all cookies”, you agree Staông chồng Exchange can store cookies on your device và discthua information in accordance with our Cookie Policy.