IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> JavaScript知识库 -> nvm 安装node版本报错clang: error: no such file or directory: ‘CXX=c++‘ -> 正文阅读

[JavaScript知识库]nvm 安装node版本报错clang: error: no such file or directory: ‘CXX=c++‘

nvm 安装node版本报错clang: error: no such file or directory: 'CXX=c++'

使用nvm 管理node多版本时,出现无法安装情况解决方案

首先附上官方参考文章地址
原文地址:https://github.com/nvm-sh/nvm/issues/2350
之前我一直用的是MBP PRO 2015 15‘’,最近公司给配了 Mac Mini M1, 需要把项目挪到新电脑上,本着来的折腾, 直接安装同版本的node和vue等时出现了如下错误:。

  1. 执行命令:

    nvm install v15.2.1

  2. 出现错误
    clang: error: no such file or directory: ‘CXX=c++’
  3. 日志如下:
    Downloading and installing node v15.2.1...
    Local cache found: $NVM_DIR/.cache/bin/node-v15.2.1-darwin-arm64/node-v15.2.1-darwin-arm64.tar.gz
    Computing checksum with shasum -a 256
    Provided checksum to compare to is empty.
    Checksum check failed!
    Removing the broken local cache...
    Downloading https://nodejs.org/dist/v15.2.1/node-v15.2.1-darwin-arm64.tar.gz...
    ##O#-  #                                                                                                                        
    Computing checksum with shasum -a 256
    Provided checksum to compare to is empty.
    tar: Error opening archive: Unrecognized archive format
    Binary download failed, trying source.
    Local cache found: $NVM_DIR/.cache/src/node-v15.2.1/node-v15.2.1.tar.gz
    Checksums match! Using existing downloaded archive $NVM_DIR/.cache/src/node-v15.2.1/node-v15.2.1.tar.gz
    Node.js configure: Found Python 2.7.16...
    INFO: configure completed successfully
    /Applications/Xcode.app/Contents/Developer/usr/bin/make -C out BUILDTYPE=Release V=0
    LD_LIBRARY_PATH=/Users/andy/.nvm/.cache/src/node-	
    v15.2.1/files/out/Release/lib.host:/Users/andy/.nvm/.cache/src/node
    v15.2.1/files/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; mkdir -p
    /Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/obj/gen; dtrace -h -xnolibs -s src/node_provider.d -o "/Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/obj/gen/node_provider.h"
    LD_LIBRARY_PATH=/Users/andy/.nvm/.cache/src/node-
    v15.2.1/files/out/Release/lib.host:/Users/andy/.nvm/.cache/src/node
    v15.2.1/files/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; mkdir -p
    /Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release; tools/specialize_node_d.py
    "/Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/node.d" src/node.d mac arm64
    touch /Users/andy/.nvm/.cache/src/node
    v15.2.1/files/out/Release/obj.target/tools/icu/icu_implementation.stamp
    touch /Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/obj.target/tools/icu/icu_uconfig.stamp
    touch /Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/obj.target/tools/icu/icu_uconfig_target.stamp
    touch /Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/obj.host/tools/icu/icu_implementation.stamp
    touch /Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/obj.host/tools/icu/icu_uconfig.stamp
    cc CXX=c++ -o /Users/andy/.nvm/.cache/src/node
    v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/bio_ssl.o
    ../deps/openssl/openssl/ssl/bio_ssl.c '-DV8_DEPRECATION_WARNINGS'
    DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-
    DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_HW' '-DOPENSSL_NO_QUIC=1'-
    '-DNDEBUG' '-DL_ENDIAN' '-DOPENSSL_PIC' '-DOPENSSL_CPUID_OBJ' '-DOPENSSL_BN_ASM_MONT' '-
    DSHA1_ASM' '-DSHA256_ASM' '-DSHA512_ASM' '-DKECCAK1600_ASM' '-DVPAES_ASM' '-
    DECP_NISTZ256_ASM' '-DPOLY1305_ASM' '-DOPENSSLDIR="/System/Library/OpenSSL/"' '-
    DENGINESDIR="/dev/null"' -I../deps/openssl/openssl -I../deps/openssl/openssl/include 
    I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/include -I../deps/openssl/openssl/crypto/modes
    -I../deps/openssl/openssl/crypto/ec/curve448 -I../deps/openssl/openssl/crypto/ec/curve448/arch_32 -
    I../deps/openssl/config -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2 -
    I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/include -I../deps/openssl/config/archs/darwin64-
    arm64-cc/asm_avx2/crypto -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/crypto/include/internal  
    -O3 -gdwarf-2 -mmacosx-version-min=10.13 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -
    Wno-missing-field-initializers -fno-strict-aliasing -MMD -MF /Users/andy/.nvm/.cache/src/node-
    v15.2.1/files/out/Release/.deps//Users/andy/.nvm/.cache/src/node-
    v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/bio_ssl.o.d.raw   -c
    cc CXX=c++ -o /Users/andy/.nvm/.cache/src/node-
    v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/d1_lib.o 
    ../deps/openssl/openssl/ssl/d1_lib.c '-DV8_DEPRECATION_WARNINGS' '-
    DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-
    DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_HW' '-DOPENSSL_NO_QUIC=1' 
    '-DNDEBUG' '-DL_ENDIAN' '-DOPENSSL_PIC' '-DOPENSSL_CPUID_OBJ' '-DOPENSSL_BN_ASM_MONT' '-
    DSHA1_ASM' '-DSHA256_ASM' '-DSHA512_ASM' '-DKECCAK1600_ASM' '-DVPAES_ASM' '-
    DECP_NISTZ256_ASM' '-DPOLY1305_ASM' '-DOPENSSLDIR="/System/Library/OpenSSL/"' '-
    DENGINESDIR="/dev/null"' -I../deps/openssl/openssl -I../deps/openssl/openssl/include -
    I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/include -I../deps/openssl/openssl/crypto/modes 
    -I../deps/openssl/openssl/crypto/ec/curve448 -I../deps/openssl/openssl/crypto/ec/curve448/arch_32 -
    I../deps/openssl/config -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2 -
    I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/include -I../deps/openssl/config/archs/darwin64-
    arm64-cc/asm_avx2/crypto -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/crypto/include/internal  
    -O3 -gdwarf-2 -mmacosx-version-min=10.13 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -
    Wno-missing-field-initializers -fno-strict-aliasing -MMD -MF /Users/andy/.nvm/.cache/src/node-
    v15.2.1/files/out/Release/.deps//Users/andy/.nvm/.cache/src/node-
    v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/d1_lib.o.d.raw   -c
    cc CXX=c++ -o /Users/andy/.nvm/.cache/src/node-
    v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/d1_msg.o 
    ../deps/openssl/openssl/ssl/d1_msg.c '-DV8_DEPRECATION_WARNINGS' '-
    DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-
    DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_HW' '-DOPENSSL_NO_QUIC=1' 
    '-DNDEBUG' '-DL_ENDIAN' '-DOPENSSL_PIC' '-DOPENSSL_CPUID_OBJ' '-DOPENSSL_BN_ASM_MONT' '-
    DSHA1_ASM' '-DSHA256_ASM' '-DSHA512_ASM' '-DKECCAK1600_ASM' '-DVPAES_ASM' '-
    DECP_NISTZ256_ASM' '-DPOLY1305_ASM' '-DOPENSSLDIR="/System/Library/OpenSSL/"' '-
    DENGINESDIR="/dev/null"' -I../deps/openssl/openssl -I../deps/openssl/openssl/include -
    I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/include -I../deps/openssl/openssl/crypto/modes 
    -I../deps/openssl/openssl/crypto/ec/curve448 -I../deps/openssl/openssl/crypto/ec/curve448/arch_32 -
    I../deps/openssl/config -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2 -
    I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/include -I../deps/openssl/config/archs/darwin64-
    arm64-cc/asm_avx2/crypto -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/crypto/include/internal  
    -O3 -gdwarf-2 -mmacosx-version-min=10.13 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -
    Wno-missing-field-initializers -fno-strict-aliasing -MMD -MF /Users/andy/.nvm/.cache/src/node-
    v15.2.1/files/out/Release/.deps//Users/andy/.nvm/.cache/src/node-
    v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/d1_msg.o.d.raw   -c
    cc CXX=c++ -o /Users/andy/.nvm/.cache/src/node-
    v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/d1_srtp.o
    ../deps/openssl/openssl/ssl/d1_srtp.c '-DV8_DEPRECATION_WARNINGS' '-
    DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-
    DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_HW' '-DOPENSSL_NO_QUIC=1' 
    '-DNDEBUG' '-DL_ENDIAN' '-DOPENSSL_PIC' '-DOPENSSL_CPUID_OBJ' '-DOPENSSL_BN_ASM_MONT' '-
    DSHA1_ASM' '-DSHA256_ASM' '-DSHA512_ASM' '-DKECCAK1600_ASM' '-DVPAES_ASM' '-
    DECP_NISTZ256_ASM' '-DPOLY1305_ASM' '-DOPENSSLDIR="/System/Library/OpenSSL/"' '-
    DENGINESDIR="/dev/null"' -I../deps/openssl/openssl -I../deps/openssl/openssl/include -
    I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/include -I../deps/openssl/openssl/crypto/modes -
    I../deps/openssl/openssl/crypto/ec/curve448 -I../deps/openssl/openssl/crypto/ec/curve448/arch_32 -
    I../deps/openssl/config -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2 -
    I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/include -I../deps/openssl/config/archs/darwin64-
    arm64-cc/asm_avx2/crypto -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/crypto/include/internal  -
    O3 -gdwarf-2 -mmacosx-version-min=10.13 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -Wno-
    missing-field-initializers -fno-strict-aliasing -MMD -MF /Users/andy/.nvm/.cache/src/node-
    v15.2.1/files/out/Release/.deps//Users/andy/.nvm/.cache/src/node-
    v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/d1_srtp.o.d.raw   -c
    cc CXX=c++ -o /Users/andy/.nvm/.cache/src/node-	v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/methods.o 	../deps/openssl/openssl/ssl/methods.c '-DV8_DEPRECATION_WARNINGS' '-	DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_HW' '-DOPENSSL_NO_QUIC=1' '-DNDEBUG' '-DL_ENDIAN' '-DOPENSSL_PIC' '-DOPENSSL_CPUID_OBJ' '-DOPENSSL_BN_ASM_MONT' '-DSHA1_ASM' '-DSHA256_ASM' '-DSHA512_ASM' '-DKECCAK1600_ASM' '-DVPAES_ASM' '-DECP_NISTZ256_ASM' '-DPOLY1305_ASM' '-DOPENSSLDIR="/System/Library/OpenSSL/"' '-DENGINESDIR="/dev/null"' -I../deps/openssl/openssl -I../deps/openssl/openssl/include -I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/include -I../deps/openssl/openssl/crypto/modes -I../deps/openssl/openssl/crypto/ec/curve448 -I../deps/openssl/openssl/crypto/ec/curve448/arch_32 -I../deps/openssl/config -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2 -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/include -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/crypto -I../deps/openssl/config/archs/darwin64-arm64-cc/asm_avx2/crypto/include/internal  -O3 -gdwarf-2 -mmacosx-version-min=10.13 -arch arm64 -Wall -Wendif-labels -W -Wno-unused-parameter -Wno-missing-field-initializers -fno-strict-aliasing -MMD -MF /Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/.deps//Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/methods.o.d.raw   -c
    clang: error: no such file or directory: 'CXX=c++'
    clang: error: no such file or directory: 'CXX=c++'
    clang: error: no such file or directory: 'CXX=c++'	
    make[1]: *** [/Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/d1_msg.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: *** [/Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/bio_ssl.o] Error 1
    make[1]: *** [/Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/d1_lib.o] Error 1
    clang: error: no such file or directory: 'CXX=c++'
    clang: error: no such file or directory: 'CXX=c++'
    make[1]: *** [/Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/methods.o] Error 1
    make[1]: *** [/Users/andy/.nvm/.cache/src/node-v15.2.1/files/out/Release/obj.target/openssl/deps/openssl/openssl/ssl/d1_srtp.o] Error 1
    make: *** [node] Error 2
    nvm: install v15.2.1 failed!
    
  4. 原来在 inter 平台是什么没有问题的, 现在在ARM平台(M1)上出现了问题, 具体什么原因没有深究,主要记录解决问题方案,有兴趣的大佬自行探索,下面贴一下原文地址:
    原文地址:https://github.com/nvm-sh/nvm/issues/2350

解决方案

  1. 第一步:打开 访达 >>> 左侧点击应用程序 >>> 找到你的终端(我是自带的出了问题)
    在这里插入图片描述
  2. 第二步:鼠标放在“终端” app上 右键 >>> 显示简介
    在这里插入图片描述
  3. 勾选下图中选项, 关闭所有终端重新打开后就正常了
    在这里插入图片描述

根据参考文档说法,好像是安装 v14以下会出问题,如下:
在这里插入图片描述
在这里插入图片描述
原文地址:https://github.com/nvm-sh/nvm/issues/2350

此处做记录,防止那天自己找不到

  JavaScript知识库 最新文章
ES6的相关知识点
react 函数式组件 & react其他一些总结
Vue基础超详细
前端JS也可以连点成线(Vue中运用 AntVG6)
Vue事件处理的基本使用
Vue后台项目的记录 (一)
前后端分离vue跨域,devServer配置proxy代理
TypeScript
初识vuex
vue项目安装包指令收集
上一篇文章      下一篇文章      查看所有文章
加:2022-02-26 11:22:00  更:2022-02-26 11:22:20 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/24 9:50:04-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码