在 mac 下用终端 curl www.baidu.com 一直报错误
curl: (7) Couldn't connect to server,
但是如果加上 sudo 给权限却可以正常运行,不知有没有大佬遇到过这种情况,求指教!!!
1
goodryb 2020-07-22 13:03:11 +08:00
$whereis curl
/usr/bin/curl $curl www.baidu.com <!DOCTYPE html> <!--STATUS OK--><html> <head><meta http-equiv=content-type content=text/html;charset=utf-8><meta http-equiv=X-UA-Compatible content=IE=Edge><meta content=always name=referrer><link rel=stylesheet type=text/css href=http://s1.bdstatic.com/r/www/cache/bdorz/baidu.min.css><title>百度一下,你就知道</title></head> <body link=#0000cc> <div id=wrapper> <div id=head> <div class=head_wrapper> <div class=s…… 并未复现同样的情况 |
2
goodryb 2020-07-22 13:03:26 +08:00 1
$whereis curl
/usr/bin/curl $curl www.baidu.com <!DOCTYPE html> <!--STATUS OK--><html> <head><meta http-equiv=content-type content=text/html;charset=utf-8><meta http-equiv=X-UA-Compatible content=IE=Edge><meta content=always name=referrer><link rel=stylesheet type=text/css href=http://s1.bdstatic.com/r/www/cache/bdorz/baidu.min.css><title>百度一下,你就知道</title></head> <body link=#0000cc> <div id=wrapper> <div id=head> <div class=head_wrapper> <div class=s…… 并未复现同样的情况 |
3
lxk11153 2020-07-22 14:31:44 +08:00
> type curl
curl is /usr/bin/curl > curl -q -I www.baidu.com/ HTTP/1.1 200 OK Accept-Ranges: bytes Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform Connection: keep-alive Content-Length: 277 Content-Type: text/html Date: Wed, 22 Jul 2020 06:29:26 GMT Etag: "575e1f60-115" Last-Modified: Mon, 13 Jun 2016 02:50:08 GMT Pragma: no-cache Server: bfe/1.0.8.18 |