【发布时间】:2018-09-18 13:56:47
【问题描述】:
我下载了弹性搜索并在我的 Windows 笔记本电脑上运行了 elasticsearch.bat,但我一尝试: 卷曲http://localhost:9200 我明白了:
C:\Temp\elasticsearch-6.4.0\bin>curl http://localhost:9200/
'curl' is not recognized as an internal or external command,
operable program or batch file.
我错过了什么?我按照以下设置说明进行操作: https://www.elastic.co/downloads/elasticsearch
'Invok _restMethod' 也会在 power shell 上报错:
PS C:\Temp\elasticsearch-6.4.0\bin> Invoke-RestMethod http://localhost:9200
**The term 'Invoke-RestMethod' 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:18
+ Invoke-RestMethod <<<< http://localhost:9200
+ CategoryInfo : ObjectNotFound: (Invoke-RestMethod:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
【问题讨论】:
-
curl 的可执行位置是否在 PATH 变量中?
-
因为powershell版本。我遇到了这个问题,根据@Leo Bartkus 的评论,我升级了我的powershell,powershell 可以识别
curl命令。
标签: elasticsearch