LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-11-2004, 02:14 AM   #1
TheMusicGuy
Member
 
Registered: Mar 2004
Distribution: Ubuntu 8.04
Posts: 127

Rep: Reputation: 15
How does one compile a program? What do you need?


Yeah, I'm STILL new to Linux, and I STILL don't know how to do a library of things.
I've noticed that almost all the software I download states that it must be compiled, and it gives me strange instructions.
How do I do that, and why can't I just get these programs already compiled?
 
Old 03-11-2004, 02:24 AM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
If you're using SuSE, you generally can - you want rpms (packages ending in .rpm) built for SuSE. To compile you need gcc and host of other applications that may not be installed by default with SuSE (not familiar with SuSE). Then, since you've read the instructions, you just follow them. Ideally, with standard tarballs (*.tar.gz, *.tar.bz2, and so on), it's

./configure (check out what's where on your system)
make (translate the source code to binaries)
make install (put the stuff where it belongs)

There's a guide on compiling somewhere around here but I haven't been able to find it lately. If you find it, it'll go into details.
 
Old 03-11-2004, 04:17 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You will need to su to root just before you do the 'make install' step. Most programs will install the binary in either /usr/bin or /usr/local/bin. There may be library files installed in /usr/lib also. To write to these directories, you have to be the root user.
 
Old 03-11-2004, 05:04 AM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Yeah, thanks for catching that. With root stuff I tend to think of 'su' as understood, but it's not 'understood' if you don't know it.

If you install something to a directory you do have write permission to, say ~/bin, after compiling with the --prefix flag, you won't need to su but that's not usual procedure. Like jschiwal says, mostly its system directories and you won't have permission to those.
 
Old 03-12-2004, 01:10 AM   #5
TheMusicGuy
Member
 
Registered: Mar 2004
Distribution: Ubuntu 8.04
Posts: 127

Original Poster
Rep: Reputation: 15
Thank you
 
  


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
Compile program ust Linux - General 5 05-31-2004 04:37 PM
Compile Program mattp Linux - Newbie 4 03-09-2004 11:13 AM
Can't compile c++ program eg_wwkaa Programming 34 06-18-2003 08:59 PM
Compile qt program. hfawzy Linux - General 2 02-18-2003 10:25 AM
compile program Eddie9 Linux - General 1 05-21-2002 10:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:29 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
Open Source Consulting | Domain Registration