Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Installing 'wget' on 10.1 UNIX
Apple has removed 'wget' from OS X 10.1, apparently due to GPL (the Gnu Public License) issues. This is a most handy command, as it can download files and web pages from the command line over an SSH connection. I use it regularly to start large downloads at home while I'm at work.

To replace 'wget', you can download it from one of the GNU software mirror sites (it's in the 'wget' directory) and compile it yourself (this will require the Developer Tools to be installed). Once you've downloaded and expanded the archive, simply "cd" to that directory and type "sudo make install" to install the new 'wget'.

Once I've received my Dev Tools CD, I'll make a pre-compiled version available on my home page.
  • Currently 3.00 / 5
  You rated: 3 / 5 (2 votes cast)

Installing 'wget' on 10.1 | 12 comments | Create New Account
Click here to return to the 'Installing 'wget' on 10.1' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
wget was replaced
Authored by: Darkshadow on Sep 27, '01 02:03:47PM
Just to let people know, Apple didn't just simply take it away and leave you with no alternative. They've placed curl in wget's place. It has the same abilities as wget, and is a whole lot nicer all around, IMHO. :)

[ Reply to This | # ]
curl -O
Authored by: faisal on Sep 27, '01 06:52:02PM

wget downloads the file to disk with the same name

curl spews the file to STDOUT (into the terminal, unless you redirect it onto another file), but there are options to dump it to file like wget:

curl -O [url]

will do the same thing as

wget [url]

I put the following line into my .cshrc file:

alias wget curl -O

which lets me use directions off stepwise which say to wget something without having to remember to use curl instead.

[ Reply to This | # ]
curl -O
Authored by: Anonymous on Sep 30, '01 09:09:30PM

If you haven't upgraded yet the easiest way to save wget is to copy
wget to another directory. I copied mine to my ~/bin directory so
it is still functional.

[ Reply to This | # ]
curl -O
Authored by: moyashi on Sep 30, '01 09:47:40PM

where is the directory for the alias to be set ???

err ... don't want to put it somewhere it doesn't belong.

actually, using curl -O is not that bad, I like the information it provides vs. wget...

appreciate the help

[ Reply to This | # ]
Authored by: wristshot on Sep 29, '01 01:39:45PM

Since Fink relies on wget, is Fink effectively broken by 10.1? That would be fairly annoying, even though I suppose fixing it would be painless. Perhaps Fink will release a new version that either installs wget or uses another program.

[ Reply to This | # ]
Authored by: jimr on Sep 30, '01 01:30:18PM

fink installs it's own wget
and is working still since the upgrade.

anyway, the new devtools seem to have some issues and have not been able to compile much with them until I can figure out the patches correctly.

In the meantime, fink staff is way ahead of the game and should have most of the answers by reading the info files in there.

[ Reply to This | # ]
Fink uses curl
Authored by: spyro_le_dragon on Sep 30, '01 08:34:56PM

and by the way it is updated to 0.3.0
I will however install wget for compatibility
and curl displays download progression nicely

[ Reply to This | # ]
Fink uses curl or wget
Authored by: Anonymous on Oct 01, '01 11:02:47PM

According to the fink installer, it uses curl or wget, depending on what's available.



[ Reply to This | # ]
Authored by: scope on Oct 05, '01 04:49:14PM

I keep on getting this message when I make, or make install:

cc -I. -I. -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc" -DLOCALEDIR="/usr/local/share/locale" -g -O2 -c html-parse.c
html-parse.c: In function `advance_declaration':
html-parse.c:449: character constant too long
html-parse.c:449: parse error before character constant
html-parse.c:449: stray '/' in program
html-parse.c:454: character constant too long
html-parse.c:461: character constant too long
html-parse.c:472: character constant too long
html-parse.c:481: character constant too long
html-parse.c:481: character constant too long
html-parse.c:481: stray '/' in program
html-parse.c:773: Unterminated string constant
make[1]: *** [html-parse.o] Error 1
make: *** [install.bin] Error 2

Can anyone help?

[ Reply to This | # ]
Fix the compile error
Authored by: robg on Oct 09, '01 10:00:13AM
Thanks to Matthew, who submitted this fix via email. You need to change the line which reads:
assert (ch == '\'' || ch == '"');
in html-parse.c, line 435, to:
assert (ch == '\'' || ch == '\"');
It should then compile properly (I haven't tested it myself, but Matthew said it worked for him. -rob.

[ Reply to This | # ]
Fix the compile error
Authored by: macubergeek on Oct 14, '01 12:36:41AM

I tried this and it worked!
Frankly I'm in awe of anyone who can find this nit picky a detail to fix to get things working;-)
not that I understand exactly what was being fixed here of course.

[ Reply to This | # ]
Another way to fix it without editing
Authored by: nibaq on Oct 18, '01 11:03:52PM

this is what I got form the wget mailing list and works

Denis Ahrens wrote:
> In line 435 in html-parse.c is a non-escaped doubleqoute (").

That's perfectly valid code.

> I cannot compile this file under MacOSX without escaping this char.

That's a bug in cpp-precomp, Apple's C pre-processor that implements support
for pre-compiled headers. The way to avoid the error is to type the following
(tcsh shell semantics) before executing ./configure:

setenv CPPFLAGS "-no-cpp-precomp"

You pretty much want to do that with almost everything you compile on Mac OS
X, by the way. Cpp-precomp is really only useful when compiling the Darwin

Hope this helps,

[ Reply to This | # ]