我试图通过nvm安装节点的版本12,但是即使安装了python,python在校验和时没有找到错误。
这个nvm和python版本:
~ % nvm --version
0.33.0
~ % python --version
Python 3.10.5这是nvm错误:
~ % nvm install 12
Downloading and installing node v12.22.12...
Local cache found: $NVM_DIR/.cache/bin/node-v12.22.12-darwin-arm64/node-v12.22.12-darwin-arm64.tar.xz
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/v12.22.12/node-v12.22.12-darwin-arm64.tar.xz...
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-v12.22.12/node-v12.22.12.tar.xz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/src/node-v12.22.12/node-v12.22.12.tar.xz
./configure: line 3: exec: python: not found
nvm: install v12.22.12 failed!这是nvm调试:
~ % nvm debug
nvm --version: v0.33.0
$SHELL: /bin/zsh
$HOME: /Users/onur.ozkir
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: none
which node: node not found
which iojs: iojs not found
which npm: /opt/homebrew/bin/npm
npm config get prefix: env: node: No such file or directory
npm root -g: env: node: No such file or directory发布于 2022-06-28 20:33:31
如果在新的M1 macs上使用nvm上的旧版本,这可能是nvm版本问题。
安装nvm的最新版本如下
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash或者使用wget
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash从.zshrc或bash配置文件中删除当前引用,也可以使用rm -rf ~/..nvm
https://stackoverflow.com/questions/72687123
复制相似问题