nvm: nvm won't install node - "Binary download from https://nodejs.org/dist/node-v6.11.3.tar.gz failed, trying source."

I keep getting this message:

~ :> nvm install 6.11.3
Clang v3.5+ detected! CC or CXX not specified, will use Clang as C/C++ compiler!
Downloading https://nodejs.org/dist/node-v6.11.3.tar.gz...
curl: (3) [globbing] bad range in column 32
Binary download from https://nodejs.org/dist/node-v6.11.3.tar.gz failed, trying source.
grep: /Users/Benedict/.nvm/.cache/src/node-\033[01;31m\033[Kv6.11.3\033[m\033[K/node-\033[01;31m\033[Kv6.11.3\033[m\033[K.tar.gz: No such file or directory
Provided file to checksum does not exist.

I’m a newbie to all of this so forgive me if there is an obvious problem. But as it is I can’t get nvm to work. It happens no matter which version of node I try to install. “nvm install node” or “nvm install stable” give this message:

~ :> nvm install node
grep: brackets ([ ]) not balanced
awk: nonterminated character class v0.12.18
input record number 1, file
source line number 3
Version 'node' not found - try nvm ls-remote to browse available versions.
  • Operating system and version: macOS Sierra 10.12.6

  • nvm debug output:


nvm --version: v0.33.4
$TERM_PROGRAM: iTerm.app
$SHELL: /bin/bash
$HOME: /Users/Benedict
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)'
uname -a: 'Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64'
OS version: Mac 10.12.6 16G29
curl: /usr/bin/curl, curl 7.54.0 (x86_64-apple-darwin16.0) libcurl/7.54.0 SecureTransport zlib/1.2.8
wget: not found
git: /usr/local/bin/git, git version 2.12.0
nvm current: system
which node: /usr/local/bin/node
which iojs:
which npm: /usr/local/bin/npm
npm config get prefix: /usr/local
npm root -g: /usr/local/lib/node_modules
  • nvm ls output:
-> system
node -> stable (-> N/A) (default)
iojs -> N/A (default)
lts/* -> lts/boron (-> N/A)
lts/argon -> v4.8.4 (-> N/A)
lts/boron -> v6.11.3 (-> N/A)
  • How did you install nvm? (e.g. install script in readme, homebrew): brew

  • What steps did you perform?

  • What happened?

  • What did you expect to happen?

  • Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH?

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

source ~/.bashrc
  • If you are having installation issues, or getting “N/A”, what does curl -I --compressed -v https://nodejs.org/dist/ print out?
*   Trying 2400:cb00:2048:1::6814:172e...
* TCP_NODELAY set
*   Trying 104.20.22.46...
* TCP_NODELAY set
* Connected to nodejs.org (104.20.22.46) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.nodejs.org
* Server certificate: COMODO RSA Domain Validation Secure Server CA
* Server certificate: COMODO RSA Certification Authority
> HEAD /dist/ HTTP/1.1
> Host: nodejs.org
> User-Agent: curl/7.54.0
> Accept: */*
> Accept-Encoding: deflate, gzip
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Date: Thu, 21 Sep 2017 02:46:28 GMT
Date: Thu, 21 Sep 2017 02:46:28 GMT
< Content-Type: text/html
Content-Type: text/html
< Connection: keep-alive
Connection: keep-alive
< Set-Cookie: __cfduid=dbf2b2bc7fcfabf9bd0c7ef454043da541505961988; expires=Fri, 21-Sep-18 02:46:28 GMT; path=/; domain=.nodejs.org; HttpOnly
Set-Cookie: __cfduid=dbf2b2bc7fcfabf9bd0c7ef454043da541505961988; expires=Fri, 21-Sep-18 02:46:28 GMT; path=/; domain=.nodejs.org; HttpOnly
< CF-Cache-Status: HIT
CF-Cache-Status: HIT
< Vary: Accept-Encoding
Vary: Accept-Encoding
< Expires: Thu, 21 Sep 2017 06:46:28 GMT
Expires: Thu, 21 Sep 2017 06:46:28 GMT
< Cache-Control: public, max-age=14400
Cache-Control: public, max-age=14400
< Server: cloudflare-nginx
Server: cloudflare-nginx
< CF-RAY: 3a19b1ba08f309b2-ORD
CF-RAY: 3a19b1ba08f309b2-ORD
< Content-Encoding: gzip
Content-Encoding: gzip

<
* Connection #0 to host nodejs.org left intact

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 8
  • Comments: 16 (9 by maintainers)

Commits related to this issue

Most upvoted comments

hm, there are a few places still where grep is used without resetting GREP_OPTIONS; if you comment out that line and restart your terminal, does the same thing still occur?

nvm is sourced, so it’s directly affected by any shell options you set.

The color control characters are probably breaking nvm’s parsing of grep output.

I’ll work on a fix to replace all remaining uses of grep with nvm_grep, which was added explicitly to work around this kind of problem 😃