繁体   English   中英

使用 nvm 安装节点 14.18.1 时,我的 mac 使用 python 3.9 并在安装时抛出错误

[英]When installing node 14.18.1 using nvm my mac uses python 3.9 and throws error on installation

我有一个大 surr 的 m1 mac。 我需要 node v14 来运行一个旧的 Angular 应用程序。 我安装了 nodev16 ialraedy,所以我尝试安装 nvm 。 安装成功,我安装任何不同版本的节点 v16 都没有问题,但是在安装节点 14.18.1 时,出于某种奇怪的原因,它正在使用 python 3.9。 我之前安装过python是不是错误地使用python 3.9而不是2.7

我也在搜索互联网和堆栈溢出,我读到节点 v14 不能在 m1 mac 上运行,这是真的吗?

有人可以告诉如何解决这个错误。

nvm install 14.18.1
Downloading and installing node v14.18.1...
Downloading https://nodejs.org/dist/v14.18.1/node-v14.18.1-darwin-arm64.tar.xz...

curl: (22) The requested URL returned error: 404 
Binary download from https://nodejs.org/dist/v14.18.1/node-v14.18.1-darwin-arm64.tar.xz failed, trying source.
grep: /Users/rohitkrishnamoorthy/.nvm/.cache/bin/node-v14.18.1-darwin-arm64/node-v14.18.1-darwin-arm64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Detected that you have 8 CPU core(s)
Running with 7 threads to speed up the build
Clang v3.5+ detected! CC or CXX not specified, will use Clang as C/C++ compiler!
Local cache found: ${NVM_DIR}/.cache/src/node-v14.18.1/node-v14.18.1.tar.xz
Checksums match! Using existing downloaded archive ${NVM_DIR}/.cache/src/node-v14.18.1/node-v14.18.1.tar.xz
$>./configure --prefix=/Users/rohitkrishnamoorthy/.nvm/versions/node/v14.18.1 <
Node.js configure: Found Python 3.9.6...
INFO: configure completed successfully
/Library/Developer/CommandLineTools/usr/bin/make -C out BUILDTYPE=Release V=0
  touch /Users/rohitkrishnamoorthy/.nvm/.cache/src/node-v14.18.1/files/out/Release/obj.target/node_dtrace_header.stamp
  touch /Users/rohitkrishnamoorthy/.nvm/.cache/src/node-v14.18.1/files/out/Release/obj.target/specialize_node_d.stamp
  c++ -o /Users/rohitkrishnamoorthy/.nvm/.cache/src/node-v14.18.1/files/out/Release/obj.target/icuucx/deps/icu-small/source/common/uniset.o ../deps/icu-small/source/common/uniset.cpp '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DU_COMMON_IMPLEMENTATION=1' '-DU_ATTRIBUTE_DEPRECATED=' '-D_CRT_SECURE_NO_DEPRECATE=' '-DU_STATIC_IMPLEMENTATION=1' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../deps/icu-small/source/common  -O3 -gdwarf-2 -mmacosx-version-min=10.13 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-exceptions -fno-strict-aliasing -MMD -MF /Users/rohitkrishnamoorthy/.nvm/.cache/src/node-v14.18.1/files/out/Release/.deps//Users/rohitkrishnamoorthy/.nvm/.cache/src/node-v14.18.1/files/out/Release/obj.target/icuucx/deps/icu-small/source/common/uniset.o.d.raw   -c
  c++ -o /Users/rohitkrishnamoorthy/.nvm/.cache/src/node-v14.18.1/files/out/Release/obj.target/icuucx/deps/icu-small/source/common/dictbe.o ../deps/icu-small/source/common/dictbe.cpp '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DU_COMMON_IMPLEMENTATION=1' '-DU_ATTRIBUTE_DEPRECATED=' '-D_CRT_SECURE_NO_DEPRECATE=' '-DU_STATIC_IMPLEMENTATION=1' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../deps/icu-small/source/common  -O3 -gdwarf-2 -mmacosx-version-min=10.13 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-exceptions -fno-strict-aliasing -MMD -MF /Users/rohitkrishnamoorthy/.nvm/.cache/src/node-v14.18.1/files/out/Release/.deps//Users/rohitkrishnamoorthy/.nvm/.cache/src/node-v14.18.1/files/out/Release/obj.target/icuucx/deps/icu-small/source/common/dictbe.o.d.raw   -c
  c++ -o /Users/rohitkrishnamoorthy/.nvm/.cache/src/node-v14.18.1/files/out/Release/obj.target/icuucx/deps/icu-small/source/common/chariter.o ../deps/icu-small/source/common/chariter.cpp '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DU_COMMON_IMPLEMENTATION=1' '-DU_ATTRIBUTE_DEPRECATED=' '-D_CRT_SECURE_NO_DEPRECATE=' '-DU_STATIC_IMPLEMENTATION=1' '-DUCONFIG_NO_SERVICE=1' '-DU_ENA

您可能需要卸载 python 3.9 并安装 Python 2.7.18。

Node 14.18.1 可以在 m1 mac 上运行,但如果您更新到 Monterey 12.3,预安装的 Python 将被删除。 所以你可能不得不重新安装它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM