提取tar文件时出现“无法打开:没有这样的文件或目录”


10

我正在尝试安装tar.gz文件的Apache Cassandra。以下是我得到的输出。

第一个实例:

tar -zxvf apache-cassandra-2.0.3-bin.tar.gz
tar (child): apache-cassandra-2.0.3-bin.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

第二实例:

tar -zxvf apache-cassandra-2.0.3-bin.tar.gz.gitignore
tar (child): apache-cassandra-2.0.3-bin.tar.gz.gitignore: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

该怎么办?我需要安装的文件位于磁盘中,而不是复制到计算机中。有关系吗


当前目录中是否存在文件?(用于pwd检查当前工作目录,cd更改目录和ls检查文件名)
Pandya

@AJ这是如何重复的?
Braiam 2014年

@Braiam我以为问题出在.tar.gz安装中...对不起..
AJ

Answers:


8

您的问题的原因在错误报告中。

Cannot open: No such file or directory

cded到apache-cassandra-2.0.3-bin.tar.gz文件所在的目录,然后运行以下命令以提取其内容。

tar -zxvf filename.tar.gz   # Replace the filename with your's
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.