我正在Ubuntu 14.04中工作,并且进行了curl调用...
curl 'http://www.webglobes.org/cesarefortelegram/Telegram/OpenProntoSoccorsi/API/getProntoSoccorsoDetailsByMunicipality.php?municipality=Torino&distance=0'
...在命令行中可以正常工作,但是如果我在shell脚本中使用
#!/bin/bash
set -x
.....
.....
/usr/bin/curl 'http://www.webglobes.org/cesarefortelegram/Telegram/OpenProntoSoccorsi/API/getProntoSoccorsoDetailsByMunicipality.php?municipality=Torino&distance=0'
.....
.....
我收到此错误
curl: (6) Could not resolve host: www.webglobles.org
我该如何解决?有建议吗?
答案 0 :(得分:0)
它在My ubuntu 14.04版本中从命令行和Shell脚本都可以正常工作。与DNS有关的内容,请参阅下面的
curl: (6) Could not resolve host: google.com; Name or service not known