I uninstalled xampp and tried to reinstall it but when trying to extract it to the /opt directory, I get the following error:
$ sudo tar -xzf xampp-linux-1.8.3-2-installer.run.tar.gz -C /opt
tar (child): xampp-linux-1.8.3-2-installer.run.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.Why does tar complaint that it cannot find the file while extracting the archive?
31 Answer
Most likely the dir in the terminal (identified by pwd) does not contain the archive that you're trying to unpack. You need to cd /path_to_archive_dir/, and then execute the command there (tar -xzf xampp-linux-1.8.3-2-installer.run.tar.gz -C /opt).