tar: /usr/local: archive not found tar: due to previous error, will exit with last error status

Source of the problem:
        When installing the spark tool, the error shown in the title is reported when decompressing the installation package, and the executed command is as follows

sudo tar -zxvf ~/Downloads/spark-2.4.0-bin-without-hadoop.tgz /usr/local/ 

Solution:
        The reason for the error is that there is a parameter -C missing in the command. After decompression, the decompression file needs to be switched to the specified folder, that is, it is not decompressed in the current folder, but needs to go to another folder The next decompression performs the decompression operation, so the -C parameter needs to be added. The correct command format is as follows

sudo tar -zxvf ~/Downloads/spark-2.4.0-bin-without-hadoop.tgz -C /usr/local/


————————————————
Copyright statement: This article is an original article of CSDN blogger "Liu Yishun", following the CC 4.0 BY-SA copyright agreement, please attach the original source link and this statement for reprinting .
Original link: https://blog.csdn.net/m0_59705760/article/details/125264082

Guess you like

Origin blog.csdn.net/m0_46829545/article/details/131094427
tar