0

我在 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

我该如何解决?建议?

4

1 回答 1

0

它在命令行和 shell 脚本的 My ubuntu 14.04 版本中运行良好。与DNS有关的东西,请参考下面

curl:(6)无法解析主机:google.com;名称或服务未知

于 2018-06-20T20:10:53.080 回答