Reputation: 13675
wget
does not support -d
on homebrew default installation. How to install wget with debug support on homebrew? Thanks.
$ wget -d -o/tmp/log -qO- http://httpbin.org/get
Debugging support not compiled in. Ignoring --debug flag.
Upvotes: 2
Views: 2714
Reputation: 93
It has debug enabled by default now, you don't need to edit the formula or pass a flag.
Upvotes: 0
Reputation: 101
It is possible to install wget with the debug support via Homebrew.
Run brew edit wget
to access the formula code, add "--enable-debug"
in the configuration section, save, then run brew install --build-from-source wget
Other configuration options can also be enabled or disabled this way (only do not forget to add a library to the "depends_on" section if you enable one in the configuration).
Upvotes: 0
Reputation: 47169
If you're feeling like going with a less convoluted way of installing packages rather than using Homebrew
then maybe try MacPorts
.
$ sudo port install wget
---> Computing dependencies for wget
---> Cleaning wget
---> Scanning binaries for linking errors
---> No broken files found.
Done!
The MacPorts of wget version supports the debug flag (-d
) out of the box:
$ wget -d -o/tmp/log -qO- http://httpbin.org/get
Setting --output-file (logfile) to /tmp/log
Setting --output-file (logfile) to /tmp/log
Setting --quiet (quiet) to 1
Setting --quiet (quiet) to 1
Setting --output-document (outputdocument) to -
Setting --output-document (outputdocument) to -
{
"args": {},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "identity",
"Connection": "close",
"Host": "httpbin.org",
"User-Agent": "Wget/1.19.4 (darwin17.3.0)"
},
"origin": "23.198.166.150",
"url": "http://httpbin.org/get"
}
$ wget --version
GNU Wget 1.19.4 built on darwin17.3.0.
Upvotes: 0
Reputation: 1548
Just for the records: After uninstalling wget install it with:
brew install wget --with-debug
Source: https://github.com/Homebrew/homebrew-core/blob/master/Formula/wget.rb
Upvotes: 3