LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   The most newbie question (https://www.linuxquestions.org/questions/slackware-14/the-most-newbie-question-537228/)

Linux_n00b_57 03-13-2007 06:58 PM

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 :)

erklaerbaer 03-13-2007 07:02 PM

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

the-yikes 03-13-2007 07:16 PM

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.

Linux_n00b_57 03-13-2007 07:28 PM

It's a .tar.bz2

erklaerbaer 03-13-2007 07:38 PM

don't want to be arrogant, but...
Read The Fine Manual

Linux_n00b_57 03-13-2007 07:39 PM

Where is it? because I can't find it.

Linux_n00b_57 03-13-2007 07:49 PM

nvm i found it, thank you, sorry for being difficult

GrapefruiTgirl 03-13-2007 08:46 PM

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.

H_TeXMeX_H 03-13-2007 10:27 PM

Remember to read the README and INSTALL and compile if they exist.

Usually it's just "./configure; make; make install"

J.W. 03-13-2007 10:53 PM

To try to summarize, compiling the source is often a 5 step dance
Code:

tar zxvf <package>
cd <directory that was created by untarring>
./configure
make
make install


hottdogg 03-13-2007 11:59 PM

if it's a tar.bz2 package.
you can do tar -xjvf <package name>. And...
Quote:

Remember to read the README and INSTALL and compile if they exist.
this is so true.

bioe007 03-14-2007 01:53 AM

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?

mattydee 03-14-2007 03:00 AM

Quote:

Originally Posted by bioe007
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?

Are you being sarcastic? I can't tell... anyways, yes you are correct. Most programs will have to be installed as root.

I would also recommend using Checkinstall (in the extras folder). It makes package maintenance sooooooo much easier:

Code:

./configure
make
su
checkinstall  (this makes a tgz binary for you)
installpkg whatever.tgz


GrapefruiTgirl 03-14-2007 07:55 AM

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 :)

onebuck 03-14-2007 09:06 AM

Quote:

Originally Posted by GrapefruiTgirl
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 :)

Hi,

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.