Can somebody please help with installing NPM in Debian?
First I tried apt-get install npm
but got this message:
Unable to locate package npm.
So I followed the installation steps for Debian from nodejs.org. The first command:
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
gave this message:
sudo command not found.
But if I install packages do not have to write sudo
so I deleted it and got this message:
-E command not found
Any hints?
Если у вас не установлено sudo
, тогда ваша командная строка должна быть такой:
curl -sL https://deb.nodesource.com/setup_9.x | bash -
apt-get install -y nodejs
Ответ Эндрю был действительно полезен, но не сработал из коробки, потому что debian все еще хотел установить старую версию nodejs, а не ту из репозитория.
Я исправил это, заставив debian чтобы установить последнюю версию nodejs
, я запустил apt-cache policy nodejs
, чтобы узнать версию последнего пакета nodejs
Затем, как только я понял это, я запустил apt install "nodejs =
, на момент написания это было apt install "nodejs = 9.11.2-1nodesource1"