我尝试从文档中在我的 Windows 11 中安装 nhost,curl 命令似乎不起作用

问题描述 投票:0回答:1

来自官方文档

我已经安装了 Docker、Git、WSL2。

跑步时

> sudo curl -L https://raw.githubusercontent.com/nhost/cli/main/get.sh | bash
错误:

sudo : the term 'sudo' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ sudo curl -L https://raw.githubusercontent.com/nhost/cli/main/get.sh  ...
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (sudo:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

我在没有 sudo 的情况下运行命令,然后错误是:

Invoke-WebRequest : A parameter cannot be found that matches parameter name 'L'.
At line:1 char:6
+ curl -L https://raw.githubusercontent.com/nhost/cli/main/get.sh | bas ...
+      ~~
    + CategoryInfo          : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

我想尝试gsudo但它没有Nhost作为应用程序。

curl command-prompt sudo nhost
1个回答
0
投票

您是否尝试过在不同的环境中运行它?您似乎正在尝试使用 PowerShell 或 GitBash。我运行了该请求,它似乎对我有用。

© www.soinside.com 2019 - 2024. All rights reserved.