Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rbenv_ruby fails because it thinks yaml archive is corrupt when it isn't. #244

Closed
rafaelmagu opened this issue Nov 18, 2012 · 6 comments
Closed

Comments

@rafaelmagu
Copy link

Using the standard rbenv recipe from RiotGames, rbenv install fails because the yaml checksum is invalid. Except it isn't. Both checksums match.

---- Begin output of /opt/rbenv/bin/rbenv install 1.9.3-p327 ----
STDOUT: 
STDERR: Downloading yaml-0.1.4.tar.gz...
-> http://cloud.github.com/downloads/sstephenson/ruby-build-download-mirror/36c852831d02cf90508c29852361d01b
-> http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz

BUILD FAILED

Inspect or clean up the working tree at /tmp/ruby-build.20121118223345.26799
Results logged to /tmp/ruby-build.20121118223345.26799.log

Last 10 log lines:
X-Cache: RefreshHit from cloudfront


checksum mismatch: yaml-0.1.4.tar.gz (file is corrupt)
expected 36c852831d02cf90508c29852361d01b, got (stdin)= 36c852831d02cf90508c29852361d01b


checksum mismatch: yaml-0.1.4.tar.gz (file is corrupt)
expected 36c852831d02cf90508c29852361d01b, got (stdin)= 36c852831d02cf90508c29852361d01b
---- End output of /opt/rbenv/bin/rbenv install 1.9.3-p327 ----

Running it manually while SSH'd into the box also yields the same output. Vanilla install of 64-bit Ubuntu Server 12.04.

@rafaelmagu
Copy link
Author

Manually installing YAML didn't work. For some reason rbenv still tries to download and compile YAML. Commands used:

cd /tmp
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar xzf yaml-0.1.4.tar.gz 
cd yaml-0.1.4
./configure --prefix=/usr/local
make && make install
cd /tmp

@jeremy
Copy link
Member

jeremy commented Nov 18, 2012

See #241. Bump your rbenv install to fix!

@jeremy jeremy closed this as completed Nov 18, 2012
@rafaelmagu
Copy link
Author

Must have missed that ticket in my search. Apologies for that. Update fixed it.

@atombender
Copy link
Contributor

Happening for me with latest (20130208, installed from Homebrew):

Downloading yaml-0.1.4.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b
-> http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
[...]
checksum mismatch: yaml-0.1.4.tar.gz (file is corrupt)
expected 36c852831d02cf90508c29852361d01b, got 07a0ad2b5c7da38a052a8fc63ff868cd

Here's something weird, though:

# wget -q -O - http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz | md5sum
36c852831d02cf90508c29852361d01b  -
# curl -s http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz | md5sum
07a0ad2b5c7da38a052a8fc63ff868cd  -

Is ruby-build using curl?

@atombender
Copy link
Contributor

Found the cause. You run curl without -q, which causes curl to load .curlrc, which in my case contains:

--silent
--write-out \n

The reason I have this is because I use curl for debugging, and it does not emit a line break at the end, which causes the prompt to be screwed up.

Since all sorts of weird things can happen if curl honors .curlrc, one should really run it with -q to suppress the config.

Or perhaps add --writeout "".

@sstephenson
Copy link
Contributor

@alexstaubo Disabling .curlrc with -q sounds like the right approach—want to open a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants