“Couldn't resolve hostname” while installing package in Octave

六月ゝ 毕业季﹏ 提交于 2019-12-11 05:38:16

问题


I have tried installing a package in Octave using this command:

pkg install signal-1.4.0.taz.gz

but I received the following error:

error: pkg: failed to read package 'signal-1.4.0.taz.gz': Couldn't resolve host name
error: called from
  pkg at line 429 column 17

Does somebody know what that means?


回答1:


You have mis-spelled the name of the package's tarball. It is likely signal-1.4.0.tar.gz rather than signal-1.4.0.taz.gz

pkg install signal-1.4.0.tar.gz

Essentially what is happening, is that Octave is unable to find the file signal-1.4.0.taz.gz on the file system (due to the mis-spelling) so then it attempts to download the file from the internet. When it tries to resolve signal-1.4.0.taz.gz as a URL, DNS name resolution fails giving you the error that you're encountering.




回答2:


I just had the same issue/error when trying to install the econometrics package on a windows install. In my case, for reasons unknown I was getting the following error:

>> pkg install econometrics-1.1.1.tar.gz

error: pkg: failed to read package 'econometrics-1.1.1.tar.gz': Couldn't resolve host name
error: called from
    pkg at line 433 column 17

The only way I managed to get it, was by first downloading the package manually into the current working directory of Octave. (See pwd output.) Only then did the install command work.

pkg install econometrics-1.1.1.tar.gz
pkg load econometrics


来源:https://stackoverflow.com/questions/53181158/couldnt-resolve-hostname-while-installing-package-in-octave

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!