简体   繁体   English

unix / linux无法解压缩文件以进行弹性搜索

[英]unix/linux can't unzip a file for elastic search

I am trying to install elastic search on my mac os 10.10.5 我正在尝试在Mac OS 10.10.5上安装弹性搜索

I am following this official page https://www.elastic.co/guide/en/elasticsearch/guide/current/_installing_elasticsearch.html 我正在关注此官方页面https://www.elastic.co/guide/zh-CN/elasticsearch/guide/current/_installing_elasticsearch.html

the page said 页面说

curl -L -O http://download.elasticsearch.org/PATH/TO/VERSION.zip curl -L -O http://download.elasticsearch.org/PATH/TO/VERSION.zip

I did this: curl -L -O http://download.elasticsearch.org/elasticsearch-1-7-2.zip 我这样做是: curl -L -O http://download.elasticsearch.org/elasticsearch-1-7-2.zip

then the page said: 然后页面上说:

unzip elasticsearch-$VERSION.zip 解压elasticsearch- $ VERSION.zip

I did this (on the same directory) 我这样做(在同一目录上)

unzip elasticsearch-1-7-2.zip

the result is: 结果是:

End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of elasticsearch-1-7-2.zip or
        elasticsearch-1-7-2.zip.zip, and cannot find elasticsearch-1-7-2.zip.ZIP, period.

what am i doing wrong please? 请问我做错了什么? how to solve it 如何解决

Update 1 更新1

I used this 我用这个

jar xvf elasticsearch-1-7-2.zip

I didn't get any error message, but i don't see the extracted file. 我没有收到任何错误消息,但没有看到提取的文件。 does that command extract the file to another location? 该命令会将文件提取到另一个位置吗?

Your URL is wrong - what you are downloading and trying to extract is text of 404 page. 您的URL错误-您正在下载并尝试提取的是404页的文本。 Try this: 尝试这个:

curl -O -L https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.2.zip

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM