【发布时间】:2019-04-06 06:12:07
【问题描述】:
在我的 debian 8 i386(32bit) 服务器上安装了 nodejs 0.10.15,它工作正常,但我需要将它更新到 10.x 版本。我使用一些路径来做到这一点,像这样:
- 卷曲-sLhttps://deb.nodesource.com/setup_10.x | bash - apt-get 安装 -y nodejs
- 非虚拟机
NVM
通过 nvm 我有这个错误 NVM is not compatible with the 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.x 后,我检查版本 node --version 和 npm --version 并且我有这个非法指令,但是如果我安装 nodejs 4.x 或 5.x 然后检查版本 node --version 它工作正常,但 npm 版本检查给了我非法指令。我该如何解决?
【问题讨论】:
-
基本上,您不应该为不同的 CPU 安装二进制文件。每一代 x86 都带有一个新的(更大的)指令集,这就是为什么新 CPU 的程序不能在旧 CPU 上运行的原因。
标签: node.js npm 32-bit i386 debian-jessie