我正在按照非常简单的步骤在 Raspberry 上升级 Node.js:
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs
它产生像veerything是正确的:...
Selecting previously unselected package nodejs.
(Reading database ... 56727 files and directories currently installed.)
Preparing to unpack .../nodejs_9.11.1-1nodesource1_armhf.deb ...
Unpacking nodejs (9.11.1-1nodesource1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up nodejs (9.11.1-1nodesource1) ...
但是,在我尝试启动之后
node -v
它给出了错误
-bash: /usr/sbin/node: No such file or directory
并且/usr/sbin/中确实没有节点目录!发生了什么?
更新:
重新启动后,相同的命令给出了另一个错误:
-bash: /usr/bin/node: cannot execute binary file: Exec format error
处理器是 Arm7
我有类似的问题,但通过 nvm 安装解决了这个问题。我仍然不确定为什么会发生此错误。
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.10/install.sh | bash
nvm install node
node -v
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句