You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nvm --version: v0.33.2
$SHELL: /bin/bash
$HOME: /home/xxxx
$NVM_DIR: '$HOME/nvm'$PREFIX: ''$NPM_CONFIG_PREFIX: ''$NVM_NODEJS_ORG_MIRROR: 'http://nodejs.mirrors.mx.sanxxxxx.com/dist'$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 4.1.2(1)-releases (x86_64-redhat-linux-gnu)'
uname -a: 'Linux 2.6.32-431.20.3.el6.mt20161028.x86_64 #1 SMP Fri Oct 28 17:50:35 CST 2016 x86_64 x86_64 x86_64 GNU/Linux'
OS version: CentOS release 6.5 (Final)
curl: /usr/bin/curl, curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
wget: /usr/bin/wget, GNU Wget 1.12 built on linux-gnu.
git: /usr/bin/git, git version 1.7.1
nvm current: v6.11.0
which node: $NVM_DIR/versions/node/v6.11.0/bin/node
which iojs: which: no iojs in ($NVM_DIR/versions/node/v6.11.0/bin:/usr/lib64/qt-3.3/bin:/usr/local/java/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:$HOME/bin)
which npm: $NVM_DIR/versions/node/v6.11.0/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v6.11.0
npm root -g: $NVM_DIR/versions/node/v6.11.0/lib/node_modules
nvm ls output:
Details
curl: (3) malformed when nvm install,
curl version is 7.19.7
If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/ print out?
Details
Downloading and installing node v4.8.3...
Downloading http://nodejs.mirrors.mx.sankuai.com/dist/v4.8.3/node-v4.8.3-linux-x64.tar.xz...
curl: (3) <url> malformed
######################################################################## 100.0%
grep: /home/xxxxx/nvm/.cache/bin/node-v4.8.3-linux-x64/node-v4.8.3-linux-x64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Downloading http://nodejs.mirrors.mx.sanxxxx.com/dist/v4.8.3/node-v4.8.3.tar.xz...
curl: (3) <url> malformed
######################################################################## 100.0%
grep: /home/shiwenzhe/nvm/.cache/src/node-v4.8.3/node-v4.8.3.tar.xz: No such file or directory
Provided file to checksum does not exist.
nvm install v4
Downloading and installing node v4.8.3...
Downloading https://nodejs.org/dist/v4.8.3/node-v4.8.3-linux-x64.tar.xz...
curl: (3) <url> malformed
######################################################################## 100.0%
grep: /home/shiwenzhe/nvm/.cache/bin/node-v4.8.3-linux-x64/node-v4.8.3-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 2 CPU core(s)
Number of CPU core(s) less than or equal to 2, running in single-threaded mode
Downloading https://nodejs.org/dist/v4.8.3/node-v4.8.3.tar.xz...
curl: (3) <url> malformed
################## 25.2%
still have the same error. v0.33.1 and before works fine
@ljharb I try v0.33.2 works fine now. i think it only happens in master branch.
i put nvm_echo curl --fail "${CURL_COMPRESSED_FLAG:-}" -q "$@"
nvm_err curl --fail "${CURL_COMPRESSED_FLAG:-}" -q "$@"
I can confirmed that problem and 7965796 is the first bad commit in this situation. This is not --fail related.
The root cause should be my commit to enabled --compressed, the usage of "${CURL_COMPRESSED_FLAG:-}", but triggered by the commit to make sure curl version >= 7.21.0, as when curl doesn't meet the version requirement, the compressed flag will turn to '' which is not a valid for curl.
Activity
21paradox commentedon Jun 22, 2017
this only happens in the master branch.
ljharb commentedon Jun 22, 2017
What does
nvm_curl_libz_support ; echo $?print out?21paradox commentedon Jun 22, 2017
@ljharb empty
ljharb commentedon Jun 22, 2017
the
echo $?doesn't print a0or a1?21paradox commentedon Jun 22, 2017
@ljharb sorry,i haven't check.after append below to nvm.sh
source nvm.sh
returns
ljharb commentedon Jun 22, 2017
not
$x?- just$?. An alternative isif nvm_curl_libz_support; then echo yes; else echo no; fi21paradox commentedon Jun 23, 2017
@ljharb echo yes
ljharb commentedon Jun 23, 2017
ah - i just realized you have a mirror set up. Does it work if you
unset NVM_NODEJS_ORG_MIRRORbefore trying?If so, then the problem is the mirror itself.
21paradox commentedon Jun 23, 2017
still have the same error. v0.33.1 and before works fine
ljharb commentedon Jun 24, 2017
Thanks. Can you also try adding either
nvm_echoornvm_errin front of the command here and tell me what command it prints out?21paradox commentedon Jun 26, 2017
@ljharb I try v0.33.2 works fine now. i think it only happens in master branch.
i put nvm_echo curl --fail "${CURL_COMPRESSED_FLAG:-}" -q "$@"
nvm_err curl --fail "${CURL_COMPRESSED_FLAG:-}" -q "$@"
before https://github.com/creationix/nvm/blob/master/nvm.sh#L113
shows:
ljharb commentedon Jun 26, 2017
#1557 added the
--failparam. @PeterDaveHello, can you shed some light?PeterDaveHello commentedon Jun 27, 2017
I can confirmed that problem and 7965796 is the first bad commit in this situation. This is not
--failrelated.The root cause should be my commit to enabled
--compressed, the usage of"${CURL_COMPRESSED_FLAG:-}", but triggered by the commit to make sure curl version >= 7.21.0, as when curl doesn't meet the version requirement, the compressed flag will turn to''which is not a valid for curl.I'll send a PR to fix it.
ljharb commentedon Jun 27, 2017
Thank you!
[Fix] Adjust $CURL_COMPRESSED_FLAG usage for curl, fix nvm-sh#1562