I don't pretend to be a unix or any kind of expert
January 14, 2006 4:26 PM Subscribe
Dumb question about curl and setting up Ruby on Rails from an extreme novice.
Here's the question, and I'll follow with some more background information: is curl supposed to just stop when it's done? I am using curl to download readline. Curl says it has downloaded everything, but keeps running. I quit out of curl and attempt to unzip readline. I get the following error:
What am I doing wrong?
Background information: I have been doing marketing and (lately) technical writing for the Web for a long time. I have enough html knowledge to build a basic site, but was kind of curious to see if I could do any programming, sort of as a lark. Since everyone is talking about Ruby and AJAX and all that nifty stuff, I decided to try with that program. But I am stuck setting it up (see this tutorial).
Here's the question, and I'll follow with some more background information: is curl supposed to just stop when it's done? I am using curl to download readline. Curl says it has downloaded everything, but keeps running. I quit out of curl and attempt to unzip readline. I get the following error:
gzip: stdin: unexpected end of file
tar: Read 1655 bytes from readline-5.1.tar.gz
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
What am I doing wrong?
Background information: I have been doing marketing and (lately) technical writing for the Web for a long time. I have enough html knowledge to build a basic site, but was kind of curious to see if I could do any programming, sort of as a lark. Since everyone is talking about Ruby and AJAX and all that nifty stuff, I decided to try with that program. But I am stuck setting it up (see this tutorial).
curl should quit on its own when it's done. I tried downloading it and curl exited normally for me after the file was finished. I then ran tar xzvf and it uncompressed just fine.
I don't know why curl wouldn't be exiting on its own. You could always try downloading the files with a different app.
posted by epugachev at 4:50 PM on January 14, 2006
I don't know why curl wouldn't be exiting on its own. You could always try downloading the files with a different app.
posted by epugachev at 4:50 PM on January 14, 2006
Try with wget.
posted by orthogonality at 4:59 PM on January 14, 2006
posted by orthogonality at 4:59 PM on January 14, 2006
Response by poster: mendel, your first command returns:
Your second returns:
Is that helpful?
Orthagonality, would that just mean using "wget" rather than "curl" in the command?
posted by lackutrol at 5:21 PM on January 14, 2006
readline-5.1.tar.gz: gzip compressed data, was "readline-5.1.tar", from Unix
Your second returns:
-rw-r--r-- 1 jeffreyd jeffreyd 2027520 Jan 14 18:22 readline-5.1.tar.gz
Is that helpful?
Orthagonality, would that just mean using "wget" rather than "curl" in the command?
posted by lackutrol at 5:21 PM on January 14, 2006
I dunno, because you didn't show us you initial command line. But probably. I'm assuming you did: curl url, and suggesting you try wget url
posted by orthogonality at 5:24 PM on January 14, 2006
posted by orthogonality at 5:24 PM on January 14, 2006
Looking at that tutorial, I assume you did
What orthogonality means is, try
instead.
posted by epugachev at 5:41 PM on January 14, 2006
curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz
What orthogonality means is, try
wget ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz
instead.
posted by epugachev at 5:41 PM on January 14, 2006
Incidentally, I've had some dealings with curl's author. He's a smart guy and will appreciate a thorough bug report.
posted by orthogonality at 5:54 PM on January 14, 2006
posted by orthogonality at 5:54 PM on January 14, 2006
Response by poster: OK, using neustile's directions, I got the download to work properly. Thanks! But, if I may, I'd like to ask about another error message. When I enter:
I get the following:
Can anyone tell me what's up with that?
posted by lackutrol at 6:41 PM on January 14, 2006
./configure --prefix=/usr/local
I get the following:
checking whether make sets $(MAKE)... no
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
Can anyone tell me what's up with that?
posted by lackutrol at 6:41 PM on January 14, 2006
Response by poster: Oh, and I'll definitely send the curl author whatever information I can. It seems like a cool program, judging from the documentation I have found.
posted by lackutrol at 6:42 PM on January 14, 2006
posted by lackutrol at 6:42 PM on January 14, 2006
Note that curl -v will show you the transaction as it happens. If you don't see the 2XX series code after the transfer, it wasn't successful.
That error that quick implies that the file is corrupt -- it's over 2MB, yet gzip is claiming EOF after little more than 1K of data. My first thought was "ASCII mode transfer of a binary file", but curl defaults to binary mode. If you're using a -B switch, don't -- (-B is ASCII -- yes, this isn't exactly the most intuitive switch.)
Normally, curl outputs to standard out. You use either the -o filename, or -O switch, to download directly to a file. -O will default to the remote name
So, if you could, try....
curl -v -O ftp://www.wherever.com/path/to/filename.gz
posted by eriko at 6:43 PM on January 14, 2006
That error that quick implies that the file is corrupt -- it's over 2MB, yet gzip is claiming EOF after little more than 1K of data. My first thought was "ASCII mode transfer of a binary file", but curl defaults to binary mode. If you're using a -B switch, don't -- (-B is ASCII -- yes, this isn't exactly the most intuitive switch.)
Normally, curl outputs to standard out. You use either the -o filename, or -O switch, to download directly to a file. -O will default to the remote name
So, if you could, try....
curl -v -O ftp://www.wherever.com/path/to/filename.gz
posted by eriko at 6:43 PM on January 14, 2006
Oops, crossed over.
Your new error means you don't have a c compiler installed. Presuming that you're using linux, you'll want to get GCC installed. Your distro should have a simple means of doing so.
posted by eriko at 6:45 PM on January 14, 2006
Your new error means you don't have a c compiler installed. Presuming that you're using linux, you'll want to get GCC installed. Your distro should have a simple means of doing so.
posted by eriko at 6:45 PM on January 14, 2006
Best answer: And if you're on OSX, you want to download and install Xcode, as this will install the gnu c compiler (gcc) and lots of other goodies you probably don't have but are going to need.
posted by epugachev at 7:05 PM on January 14, 2006
posted by epugachev at 7:05 PM on January 14, 2006
This thread is closed to new comments.
file readline-5.1.tar.gz
ls -l readline-5.1.tar.gz
return?
posted by mendel at 4:48 PM on January 14, 2006