Installation 异常调用";下载字符串“;加上;1“;论点:“;无法连接到远程服务器";

Installation 异常调用";下载字符串“;加上;1“;论点:“;无法连接到远程服务器";,installation,windows-10,runtime-error,nativescript,Installation,Windows 10,Runtime Error,Nativescript,我刚开始使用以下命令在Windows 10上安装NativeScript: @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))" 我从这里的安装指南得到的 但我得到了这个错误信息: Exception calling "DownloadString" wi

我刚开始使用以下命令在Windows 10上安装
NativeScript

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
我从这里的安装指南得到的

但我得到了这个错误信息:

Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"
At line:1 char:1
+ iex ((new-object net.webclient).DownloadString('https://www.nativescr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException


C:\Windows\system32>@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"
At line:1 char:1
+ iex ((new-object net.webclient).DownloadString('https://www.nativescr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

问题是什么?如何解决?

以下步骤对我有效:

  • 从URL()下载该文件
  • 以管理员身份运行cmd,并将cd放入下载文件的目录
  • 在cmd中执行以下命令:
    powershell-noexit“&”。/native script.ps1”“

  • 确保您的网络中可以访问URL(然后重定向到)。@Manoj:我也遇到了同样的问题。您提到的url正在我的浏览器中打开,但我仍然面临相同的错误