The most newbie question
Ok, I've looked around to try and find the answer first, nothing.
So this may be the easiest question to answer or maybe not, but i have determined that is important enough for me to ask. How do you do basic compiling? For example, i've downloaded an emulator, or maybe just a random program, but I can't compile it because I don't know how. Sooooo if you could answer it for me, or maybe point me in the right direction, i would be most greatful :) |
you will have to untar the package, usually run configure(after reading README and INSTALL) and then make; make install.
do you know linuxpackages.net ? ... man tar man gcc man make more /usr/doc/Linux-HOWTOs/* EDIT: man man |
It can be a mine field
Hi Linux_n00b_57, nice to meet you and it's a pleasure to see someone other then myself willing to ask a question, thats the thing i find about linuxquestions, no body here has to ask questions they all seem to be programmed at birth with the answeres (wish i was them)
Anyway in response, if you have downloaded a package off the net they quite often end with a different identifier ie windows would be .exe, redhat would be .rpm and so on and so on. Slackware precompiled packages ten to end with .tgz where as source packages often end with .tar.gz Assuming now you have a source package (.tar.gz) you will have to unpack it first so place it in a folder of your choosing and open a konsole and (in my experience) using the cd command change into the directory your package is stored in. Now type in tar -zxvf yourfilename.tar.gz once youve done this type in ./configure now type in make and finally type in makeinstall If your downloaded package ends with .tgz then simply open a console and again using the cd command change to the directory your package is in and type in the following installpkg yourpackagename.tgz and press enter. I may be slightly wrong as i tend to follow erklaerbaer's advice and download the pre built package from www.linuxpackages.net or packages.slackware.it is also a viable option Let us know how you get on. |
It's a .tar.bz2
|
don't want to be arrogant, but...
Read The Fine Manual |
Where is it? because I can't find it.
|
nvm i found it, thank you, sorry for being difficult
|
Hiya ;), not sure which manual you've found, but there's the 'man' manual, the 'info' manual, and the docs, which are in that order (for me anyways) the places to look in your own computer (as opposed to on the internet) for information about anything.
So in a console, 'man tar' or 'info tar' will return whatever MANual pages there might be for the tar command. The docs that come with Slackware (I think) are located in /var/doc or /var/docs but there may be other locations for stuff too. If you happen to be using a desktop environment, it is quite easy if you have ARK or a similar archive program available. Then you can just navigate to the bz2 or zip file or whatever it is, right click it, and select 'Extract Here...'. Most times it will extract into a new folder of its own, where you would then go into, and then follow The-Yikes' instructions above from in a terminal/console window. |
Remember to read the README and INSTALL and compile if they exist.
Usually it's just "./configure; make; make install" |
To try to summarize, compiling the source is often a 5 step dance
Code:
tar zxvf <package> |
if it's a tar.bz2 package.
you can do tar -xjvf <package name>. And... Quote:
|
am I the only one who adds the step:
su before make install? I thought everything was to be compiled as user, and install as root? |
Quote:
I would also recommend using Checkinstall (in the extras folder). It makes package maintenance sooooooo much easier: Code:
./configure |
LOL :D forgot the su part.. Though to be truthful:
A) I often try as a user first to see what happens, and B) most of the time, I open my console from an already-su'd konqueror, because I need su-konqueror to move the package into its resting place, so the console winds up su too :) |
Quote:
To expand on the 'su'. If the package/program is system wide then the 'su' would be used. If the install package/program is user specific then the user can install in his/her environment. |
All times are GMT -5. The time now is 01:01 AM. |