Node Version Manager install - nvm command not found

后端 未结 26 1866
名媛妹妹
名媛妹妹 2020-11-30 16:18

I am trying to install NVM as per these instructions

I typed in this command in terminal:

$ curl https://raw.github.com/creationix/nvm/master/instal         


        
26条回答
  •  一生所求
    2020-11-30 16:45

    Not directly connected to the question, but there is a similar problem that may happen, take a look at this question: Can't execute nvm from new bash


    Here's my answer on that post, just for the reference:

    If you are running from a new bash instance, and you HAVE the initialization code at your ~/.bashrc, ~/.bash_profile, etc, then you need to check this initialization file for conditionals.

    On Ubuntu 14, there is a:

    case $- in
        *i*) ;;
          *) return;;
    esac
    

    At line 6, that will halt it's execution if bash is not being ran with the "-i" (interactive) flag. So you would need to run:

    bash -i
    

    Also, at the end of the file, there is a

    [ -z "$PS1" ] && return
    

    That will halt it's execution if not being ran with $PS1 set (like on a remote ssh session).

    If you do not wish to add any env vars or flags, you will need to remove those conditionals from your initialization file.

    Hope that's helpful.

提交回复
热议问题