在我的debian 8 i386(32bit)服务器上安装了nodejs 0.10.15,它可以正常工作,但是我需要将其更新为10.x版本。我使用一些路径来做到这一点,就像这样:
nvm出现此错误NVM与npm config“ prefix”不兼容
调试:
nvm --version: v0.34.0
$SHELL: /bin/bash
$SHLVL: 1
$HOME: /root
$NVM_DIR: '$HOME/.nvm'
$PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 4.3.30(1)-release (i586-pc-linux-gnu)'
uname -a: 'Linux 3.16.0-4-686-pae #1 SMP Debian 3.16.43-2 (2017-04-30) i686 GNU/Linux'
OS version: Debian GNU/Linux 8
curl: /usr/bin/curl, curl 7.38.0 (i586-pc-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1t zlib/1.2.8 libidn/1.29 libssh2/1.4.3 librtmp/2.3
wget: /usr/bin/wget, GNU Wget 1.16 built on linux-gnu.
git: not found
grep: /bin/grep, grep (GNU grep) 2.20
awk: not an option: --version
awk: /usr/bin/awk,
sed: /bin/sed, sed (GNU sed) 4.2.2
cut: /usr/bin/cut, cut (GNU coreutils) 8.23
basename: /usr/bin/basename, basename (GNU coreutils) 8.23
rm: /bin/rm, rm (GNU coreutils) 8.23
mkdir: /bin/mkdir, mkdir (GNU coreutils) 8.23
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.4.2
nvm current: none
which node:
which iojs:
which npm:
npm config get prefix: -bash: npm: command not found
npm root -g: -bash: npm: command not found
我使用nvm使用--delete-prefix v10.15.0,但指令不合法
在安装nodejs 10.xi之后,检查版本node --version和npm --version,我得到了这个非法指令,但是如果我安装了nodejs 4.x或5.x,然后检查版本node --version则它正常,但是npm版本检查给了我该非法指示。我该如何解决?
答案 0 :(得分:0)
本页显示10及更高版本不支持i386。...
可用的体系结构:
NodeSource将继续维护以下架构,将来可能会添加其他架构。
i386 (32-bit)—not available for Node.js 10 and later
amd64 (64-bit)
armhf (ARM 32-bit hard-float, ARMv7 and up: arm-linux-gnueabihf)
arm64 (ARM 64-bit, ARMv8 and up: aarch64-linux-gnu)