Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
did you inside the folder where tar.gz file is located? –  Avinash Raj Feb 9 at 16:32
    
Can you do ls -l in the dir where you run this command? –  landroni Feb 9 at 16:36
    
You change users (sudo) to a different person. That different person needs read rights on the tarball. Does that person (uid 0) have those rights? (The usual answer is: Heck yes, toor/root/admin has those rights, but but SE linux that is no longer always true. –  Hennes Feb 9 at 17:45
add comment

1 Answer 1

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.