【问题标题】:Problems installing node with nvim使用 nvim 安装节点时出现问题
【发布时间】:2021-11-01 09:36:11
【问题描述】:

当我尝试使用 nvmi 安装某些版本的节点时收到此消息 我严格按照页面中的说明进行操作是行不通的。

    Downloading and installing node v14.17.6...
Downloading https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-x64.tar.xz...
Warning: Failed to create the file                                             
Warning: /home/facundo/.nvm/.cache/bin/node-v14.17.6-linux-x64/node-v14.17.6-li
Warning: nux-x64.tar.xz: Permission denied
curl: (23) Failure writing output to destination

Binary download from https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-x64.tar.xz failed, trying source.
grep: /home/facundo/.nvm/.cache/bin/node-v14.17.6-linux-x64/node-v14.17.6-linux-x64.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
Downloading https://nodejs.org/dist/v14.17.6/node-v14.17.6.tar.xz...
Warning: Failed to create the file                                             
Warning: /home/facundo/.nvm/.cache/src/node-v14.17.6/node-v14.17.6.tar.xz: 
Warning: Permission denied
curl: (23) Failure writing output to destination

Binary download from https://nodejs.org/dist/v14.17.6/node-v14.17.6.tar.xz failed, trying source.
grep: /home/facundo/.nvm/.cache/src/node-v14.17.6/node-v14.17.6.tar.xz: No such file or directory
Provided file to checksum does not exist.

【问题讨论】:

    标签: installation terminal ubuntu-20.04 neovim


    【解决方案1】:

    您没有提供命令和您遵循的文档。 NVM 的安装非常简单。

    (1/4) curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash 确保您已安装 curl。 curl --version给了我7.68.0

    (2/4)export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

    (3/4) source ~/.bashrc 在终端中获取 nvm 命令

    您现在已准备好使用nvm 命令。

    (4/4) nvm ls-remote 用于检查可用版本,现在您可以明确选择要安装的版本,也可以使用nvm install 'lts/*' 安装最新的lts 版本

    来源:Github Official NVM docs

    【讨论】:

    • 我已经安装了 nvm。该消息是当我尝试使用它来安装节点时。 nvm install v14.16.1 并在帖子中得到错误。当我使用第二步的导出命令时,我得到 bash: export: [': not a valid identifier bash: export: -s': not a valid identifier bash: export: /home/facundo/.nvm/nvm.sh': not a valid identifier bash: export: ]': not a valid identifier
    • 您是否将 nvm 安装为 sudo,现在尝试安装为非 sudo ?我认为您需要超级用户才能使用 nvm 命令安装node
    猜你喜欢
    • 1970-01-01
    • 2021-04-07
    • 2021-01-19
    • 2022-01-14
    • 2020-12-24
    • 1970-01-01
    • 2018-07-17
    • 2018-12-05
    • 1970-01-01
    相关资源
    最近更新 更多