LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-01-2008, 10:30 PM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Rep: Reputation: 69
Just downloaded pcalc.tar.gz, how do I install this bad boy?


I'm trying to install pcalc. I downloaded the pcalc-000.tar.gz onto my desktop. I'd like to install this program. What should I do in terminal?

Also, I got a few questions. There are many C files like example.c as well as a makefile in this tar.gz file. So, it's basically all source right. What I'd be doing is compiling this source code written in C to work on my type of processor and my os Fedora Core 8? Is understanding correct?

Anyhow, what directory does the pcalc command get copied too?

So I know I have to go to terminal, log in as root and do something like
untar file.tar.gz /tmp
then go to /tmp and ./makefile or something?

Could you guys give me a quick quide as to what to do? Thanks.
 
Old 07-01-2008, 11:57 PM   #2
LordAnta
Member
 
Registered: Apr 2008
Location: Bucharest, Romania
Distribution: Slackware current
Posts: 126

Rep: Reputation: 17
Code:
  tar -zxvf pcalc-000.tar.gz
  cd pcalc-000 
  make
  make install
You don't need to copy to /tmp.

Last edited by LordAnta; 07-01-2008 at 11:58 PM.
 
Old 07-02-2008, 09:32 AM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Original Poster
Rep: Reputation: 69
Any answers on the other questions I asked? I wanna understand what make and make install really do.

Last edited by trist007; 07-02-2008 at 10:32 AM.
 
Old 07-02-2008, 11:08 AM   #4
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Original Poster
Rep: Reputation: 69
When I run make

[root@localhost:/home/trist007/Desktop/pcalc-000]$ make
flex -opcalcl.c pcalcl.l
make: flex: Command not found
make: *** [pcalcl.o] Error 127
[root@localhost:/home/trist007/Desktop/pcalc-000]$ make install
install pcalc /usr/bin
[root@localhost:/home/trist007/Desktop/pcalc-000]$ pcalc
bash: /usr/bin/pcalc: /lib/ld-linux.so.1: bad ELF interpreter: No such file or directory
 
Old 07-02-2008, 11:39 AM   #5
LordAnta
Member
 
Registered: Apr 2008
Location: Bucharest, Romania
Distribution: Slackware current
Posts: 126

Rep: Reputation: 17
make compiles your program and make install, install it, usually in /usr/local.

For more info try man make

You don't have flex. Install the latest flex provided by your distribution or download and compile it.
 
Old 07-02-2008, 11:51 AM   #6
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Original Poster
Rep: Reputation: 69
I'm still having trouble

[root@localhost:/home/trist007/Desktop/pcalc-000]$ make
flex -opcalcl.c pcalcl.l
pcalcl.l:290: warning, rule cannot be matched
cc -c pcalcl.c -o pcalcl.o
pcalcl.c:696:25: error: macro "yywrap" passed 1 arguments, but takes just 0
make: *** [pcalcl.o] Error 1
[root@localhost:/home/trist007/Desktop/pcalc-000]$ make install
install pcalc /usr/bin
 
Old 07-02-2008, 05:31 PM   #7
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Original Poster
Rep: Reputation: 69
any ideas on my issue?
 
Old 07-03-2008, 03:14 PM   #8
lwasserm
Member
 
Registered: Mar 2008
Location: Baltimore Md
Distribution: ubuntu
Posts: 184

Rep: Reputation: 41
Usually a tarball for a program will have a README file or some other obviously named file with instructions for installation. There is no standard method, do not attempt any particular commands until you review whatever documentation is included after extracting and untarring the source files. Sometimes a tar file might even contain a binary executable. That said, the most common sequence is something like this

extract & untar
change to directory created by untarring the files
Look for the README or other documentation
Probably the most common sequence of commands would be:

./configure
make
make install

in that order, but sometimes there is an "install.sh" script or other command instead. That's why it's important to read the doc first. If you got the tarball from a web site (as opposed to ftp) there may be instructions on that web page.
 
Old 07-03-2008, 04:34 PM   #9
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
Wouldn't you typically make clean in between unsuccessful compiles ?

Quote:
The clean target

Notice that our Makefile from the previous section has a peculiar target named clean with no dependency list. The clean target is a widespread convention for providing a rule which cleans up the directory and revert it to its source-only state, before any builds were performed. The command for this rule is usually a rm command which removes any object files, binaries, core dumps, temporary files, etc. This allows us to simply type make clean to start fresh.
Not that it would resolve the issue you are having, but housekeeping in between compile attempts is usually a good idea.

Last edited by farslayer; 07-03-2008 at 04:35 PM.
 
Old 07-03-2008, 09:17 PM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,169

Rep: Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207
Let me see if I can sort this out...

In the Windows world, "there is basically one way to do it." There is basically only one operating-system environment that is possible, one type of hardware and so-on, and that environment has been rigorously defined by Microsoft. Software developers can therefore build "installers" that simply take care of the entire process of correctly installing software: there are not too many choices to make.

In the Linux world, on the other hand, "anything goes," and believe me I do mean, "anything." The poor software developer does not even know what kind of CPU the target machine might be running, nor if so, in exactly what environment.

So here, in general, is how the developer solves the problem, in reverse order:

(0) Someone might have solved the following problem for you by creating a "package" that you can simply "install." If such a package exists, count your many lucky-stars and do that ... send a nice financial contribution to that kind good soul ... because, thanks to his or her hard work, you can now avoid all of the following steps...

(1) The final deliverable is probably going to be a .tar.gz file, affectionately known as "a tarball." This is a compressed file, much like a "zip." You'll extract the content of the file with a command like tar xzvf filename.

(2) The first thing you'll be expected to do is to run a special script file, present in the tarball, called "configure." The magic is: first cd into the directory that was created, then issue ./ configure. Notice the leading period, slash, and space: they're all important.

(3) The configure script will grind away for a while. Maybe a long while, but consider just what it is doing. This script is figuring out how to build this program on your machine.

(4) When the configure-script has finished, it has built a "Makefile." So, all you need to do now is to type: make. The computer will now compile ... literally generate ... the actual program that will eventually run on your computer.

(5) After this process is finished, the routine command to be issued to install the software is: make install.

(6) There are many variations. For instance, in the command above, "install" is what's called a make target. The Makefile can define many "targets." Applications vary considerably in this regard.

(7) The configure step can have many options. Sometimes, the "voodoo" that must be applied at this step to get the intended result can be very spooky indeed. But it's all there for a reason: remember, the application is designed to install itself and to work properly in an environment that is, to the application designer, completely unpredictable.

-----

If you ever wondered what a "distro" developer is actually doing, now you know. "Distros" decide upon a well-chosen set of "standard configurations" for what is actually a huge collection of software, on a few "standard" machines, and they've figured out a way to devise a "known-good configuration" that works on them and then to deploy it to you. They do their job amazingly well... well enough that you grouse when anything goes wrong, and well enough that folks like me are stunned that it even works at all.

"Credit Where Credit Is Due" Dept.: One thing's for sure about Linux... it shows you just how good Microsoft Corporation actually is at "what they do." No matter what you do or don't feel about "Gates-Co," their technical achievement is also "more amazing than (they want you to have to have) ever dreamed." In a world where "anything could go catastrophically wrong at any step..." it usually doesn't. And that, my friends and neighbors, just happens to be the product of amazingly hard work.

Last edited by sundialsvcs; 07-03-2008 at 09:19 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
I just downloaded a game in a tar.bz2 file. How do I install and run it? Mac_09 Linux - Newbie 2 05-19-2008 01:40 AM
How to create .diff.gz/.dsc/.orig.tar.gz from a downloaded tar.gz application? frenchn00b Linux - General 4 05-18-2008 10:09 AM
LXer: Middleware's Outspoken Bad Boy Bows Out of Red Hat LXer Syndicated Linux News 0 02-11-2007 06:21 AM
How to install a downloaded tar.gz? zeroz52 Linux - Newbie 8 10-06-2006 11:32 PM
LXer: JBoss' Fleury: The Bad Boy of Open Source LXer Syndicated Linux News 0 04-09-2006 12:33 AM


All times are GMT -5. The time now is 12:36 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration