Ketika saya mencoba untuk memanggil query.yahooapis.com dengan curl itu mencoba menggunakan alamat ipv6 tetapi IPV6 dinonaktifkan di komputer saya
$ curl -v 'http://query.yahooapis.com/'
* Hostname was NOT found in DNS cache
* Trying 98.137.200.255...
* Trying 2001:4998:58:2201::1010...
* Immediate connect fail for 2001:4998:58:2201::1010: No route to host
* Trying 2001:4998:58:2201::1010...
* Immediate connect fail for 2001:4998:58:2201::1010: No route to host
* Trying 2001:4998:58:2201::1010...
* Immediate connect fail for 2001:4998:58:2201::1010: No route to host
* Trying 2001:4998:58:2201::1010...
* Immediate connect fail for 2001:4998:58:2201::1010: No route to host
Ifconfig saya:
$ ifconfig en1
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether b0:34:95:f0:2c:46
inet 192.168.0.13 netmask 0xffffff00 broadcast 192.168.0.255
nd6 options=1<PERFORMNUD>
media: autoselect
status: active
Saya menggunakan Yosemite 10.10.2
Adakah cara untuk mengatasi masalah ini?
Anda dapat meminta curl untuk menggunakan IPv4 secara eksplisit:
sumber