LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Extracting archive file to /opt? (https://www.linuxquestions.org/questions/programming-9/extracting-archive-file-to-opt-631932/)

DaftDave 03-31-2008 10:04 AM

Extracting archive file to /opt?
 
Have gone here: Here
and downloaded as per instructions on the site xampp-linux-1.6.6.tar.gr (saved to disc).

I was then required to extract the downloaded archive to "/opt". I have tried using: pc xampp-linux-1.6.6.tar.gz /opt but failed at every attempt. Could someone help me out here please. I am running Linux Mint. Thanks in advance. DD

colucix 03-31-2008 10:18 AM

Quote:

Originally Posted by DaftDave (Post 3106006)
I have tried using: pc xampp-linux-1.6.6.tar.gz /opt but failed at every attempt.

What is pc? The tutorial tells you the exact command
Code:

tar xvfz xampp-linux-1.6.6.tar.gz -C /opt
Be patient and read carefully! :)

DaftDave 03-31-2008 11:02 AM

Hello there!
I have been really patient and have gone over and over the code to make sure that there are no typo errors:

tar xvzf xampp-linux-1.6.6.tar.gz -C /opt

and still fail?

colucix 03-31-2008 11:13 AM

Do you get some error message?

DaftDave 03-31-2008 11:33 AM

xampp-linux-1.6.6.tar.gz is located on my desktop. I have logged in as "root" and then typed:
tar xvfz xampp-linux-1.6.6.tar.gz -C /opt which resulted in the following output:

Tar: xampp-linux-1.6.6.tar.gz: Cannot open: No such file or directory

Tar: Error is not recoverable: exiting now

Tar: Child returned status 2

Nylex 03-31-2008 11:47 AM

Obviously you need to be in the directory that the file resides in. Otherwise, how do you expect the file to be found (unless you supply an absolute path, of course)?

DaftDave 03-31-2008 12:34 PM

I have opened a terminal and once logged in as "root" i then typed "ls" then typed "cd Desktop" and finally i typed:

tar xvfz xampp-linux-1.6.6.tar.gz -C /opt

But still no luck!
Can anyone tell me what i'm doing wrong please.

Nylex 03-31-2008 12:37 PM

Is the file actually in the directory? Show the output of ls..

jay73 03-31-2008 12:49 PM

Quote:

I have opened a terminal and once logged in as "root" i then typed "ls" then typed "cd Desktop"
There is your problem: you're on root's desktop. Just type pwd if you need confirmation. If you downloaded to the desktop of your regular user, you need to cd /home/username/Desktop

DaftDave 03-31-2008 01:13 PM

When i typed "ls" it listed all the directories: amsn_received, Documents, Music, Pictures, Templates, Desktop, Downloads, Network, Projects, Video. But when i typed "cd Desktop" daftdave@daftdave-desktop:-/Desktop$ appeared and nothing else. I thought the contents of Desktop would have been displayed. I didn't login as root while doing the above. Although when i opened the main menu and clicked on the Home Folder and then selected the Desktop directory it opened with all it's contents on display?

jay73 03-31-2008 01:17 PM

cd does not list anything, ls does. If you use ls after cd, that is when the contents are displayed. Also, if you are not certain where you are, use pwd (print working directory), it will tell you.

DaftDave 03-31-2008 01:56 PM

Have finally been able to view "xampp-linux-1.6.6.tar.gz" although they displayed with red text?

jay73 03-31-2008 02:40 PM

That's OK, that's just to indicate file type. Do you know that you can probably extract that file by simply right-clicking it and selecting "Extract"? You could then move it to /opt.

DaftDave 04-01-2008 02:23 AM

I did right-click on the file and select "Extract". So now when i open a terminal i can see the entry for "xampp-linux-1.6.6.tar.gz" which is in red text and then "LAMPP" which is in green text. Can i now install "LAMPP" by using:
& sudo apt-get install lampp?

Nylex 04-01-2008 06:46 AM

Well no, because "apt-get install" installs packages (.deb) from online repositories (you may also be able to install .deb packages from optical media, or your local disk in this way but I'm not sure). apt-get will not know how to deal with .tar.gz files because they're not .deb packages. There should be a readme file or some kind of installation documentation either in the archive or at the location from which you obtained the archive. Usually green is used to show that files are executable, so you could try running the executable with "./LAMPP" and seeing what happens..


All times are GMT -5. The time now is 08:54 AM.