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. |
Code:
tar -zxvf pcalc-000.tar.gz |
Any answers on the other questions I asked? I wanna understand what make and make install really do.
|
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 |
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. |
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 |
any ideas on my issue?
|
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. |
Wouldn't you typically make clean in between unsuccessful compiles ?
Quote:
|
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... :eek: (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. |
All times are GMT -5. The time now is 06:14 PM. |