wget
不支持自制默认安装的-d
。如何在自制软件上安装带有调试支持的wget?感谢。
$ wget -d -o/tmp/log -qO- http://httpbin.org/get
Debugging support not compiled in. Ignoring --debug flag.
答案 0 :(得分:1)
仅供记录:卸载wget后,使用以下命令安装:
brew install wget --with-debug
来源:https://github.com/Homebrew/homebrew-core/blob/master/Formula/wget.rb
答案 1 :(得分:0)
如果您觉得使用不太复杂的方式安装软件包而不是使用Homebrew
,那么可以尝试使用MacPorts
。
$ sudo port install wget
---> Computing dependencies for wget
---> Cleaning wget
---> Scanning binaries for linking errors
---> No broken files found.
完成!
wget 版本的 MacPorts 支持 调试标记 (-d
)框:
$ 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.