Installing on CentOS 6 failes with npm.taobao.org mirrors #1549
Labels
bugs
Oh no, something's broken :-(
installing node
Issues with installing node/io.js versions.
pull request wanted
This is a great way to contribute! Help us out :-D
I will summary this bug in short and would like to discuss PR with you maintainers.
I use
setting to install node.js on a CentOS 6 server. The server is equipped with curl and libz support, so nvm will run
A simple call on http://npm.taobao.org/mirrors/node/v6.11.0/node-v6.11.0.tar.xz will looks like
so npm.taobao.org will redirect to cdn.npm.taobao.org.
However, the built-in curl version of CentOS 6 is 7.19.7 (as of OP posting date), as is mentioned on curl changelog about 7.21.0, a bug is fixed namely
So what happen is curl 7.19.7 will prepend the response-body
Redirecting to <a href="http://cdn.npm.taobao.org/dist/node/v6.11.0/node-v6.11.0.tar.xz">http://cdn.npm.taobao.org/dist/node/v6.11.0/node-v6.11.0.tar.xz</a>.
to the binary tar.xz which causes a checksum mismatch on installing each time.Here is the proposed PR solution, I can work on a PR if we agree on the solution.
nvm_curl_version
routine to detectcurl
versionnvm_curl_libz_support
as well asnvm_version_greater_than_or_equal_to curl_version 7.21.0
to determine whether we need--compressed
option.Here is the reports routine but I am afraid it would not offer more information on this issue.
Operating system and version: CentOS 6.7 (Final)
nvm debug
output:nvm ls
output:How did you install
nvm
? (e.g. install script in readme, homebrew): readmeWhat steps did you perform?
nvm install 6
What happened? It keeps complaining before it fails finally.
What did you expect to happen?
Installation succeeds.
Is there anything in any of your profile files (
.bashrc
,.bash_profile
,.zshrc
, etc) that modifies thePATH
?nope
curl -I --compressed -v https://nodejs.org/dist/
print out?The text was updated successfully, but these errors were encountered: