LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-31-2008, 10:04 AM   #1
DaftDave
Member
 
Registered: Mar 2008
Posts: 34

Rep: Reputation: 15
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
 
Old 03-31-2008, 10:18 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by DaftDave View Post
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!
 
Old 03-31-2008, 11:02 AM   #3
DaftDave
Member
 
Registered: Mar 2008
Posts: 34

Original Poster
Rep: Reputation: 15
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?
 
Old 03-31-2008, 11:13 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Do you get some error message?
 
Old 03-31-2008, 11:33 AM   #5
DaftDave
Member
 
Registered: Mar 2008
Posts: 34

Original Poster
Rep: Reputation: 15
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
 
Old 03-31-2008, 11:47 AM   #6
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
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)?
 
Old 03-31-2008, 12:34 PM   #7
DaftDave
Member
 
Registered: Mar 2008
Posts: 34

Original Poster
Rep: Reputation: 15
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.
 
Old 03-31-2008, 12:37 PM   #8
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Is the file actually in the directory? Show the output of ls..
 
Old 03-31-2008, 12:49 PM   #9
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
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
 
Old 03-31-2008, 01:13 PM   #10
DaftDave
Member
 
Registered: Mar 2008
Posts: 34

Original Poster
Rep: Reputation: 15
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?
 
Old 03-31-2008, 01:17 PM   #11
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
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.
 
Old 03-31-2008, 01:56 PM   #12
DaftDave
Member
 
Registered: Mar 2008
Posts: 34

Original Poster
Rep: Reputation: 15
Have finally been able to view "xampp-linux-1.6.6.tar.gz" although they displayed with red text?
 
Old 03-31-2008, 02:40 PM   #13
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
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.
 
Old 04-01-2008, 02:23 AM   #14
DaftDave
Member
 
Registered: Mar 2008
Posts: 34

Original Poster
Rep: Reputation: 15
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?
 
Old 04-01-2008, 06:46 AM   #15
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
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..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Self-extracting Archive HOWTO LXer Syndicated Linux News 0 04-20-2007 05:01 PM
Extracting files from .bin archive Sir Loin Linux - Software 5 03-25-2007 08:12 PM
tar - extracting a single directory from a large archive? lowpro2k3 Linux - General 1 07-24-2005 02:44 AM
Extracting tar.bz2 archive through console grim_chel Linux - Newbie 3 06-28-2004 11:27 AM
opt software, file hierarchy & prep. packages pross AIX 1 04-14-2004 01:33 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration