LinuxQuestions.org
Review your favorite Linux distribution.
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 04-10-2011, 08:07 AM   #16
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899

Quote:
./configure
make
make install
In general this is correct.
However, it all depends on the package you want to install.
Ex, for John the Ripper this isn't the case.
Read the README and/or INSTALL files for directions for the package you want to install.

Kind regards
 
Old 04-10-2011, 08:26 AM   #17
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,093

Rep: Reputation: 197Reputation: 197
The configure, make, make install method of installing software common but not the only way. There is more than one method and which method is used depends on the choice made by the person or people who wrote the software. For example the other day I built software called TeXworks which uses qmake.

The configure, make, make install method is not unique to RedHat, or even to Linux.

You do not have to be root and often it is desirable not to be root unless you're wanting to install the software so it's available for all users. Running make install as root has the potential to overwrite critical files. You can specify a location for the software to be installed.

Code:
$ ./configure --prefix=${HOME}/myapps/name_of_software
You run that and then make and make install as your own usercode and you end up with the software installed in the directory specified. Of course only your user can then use it (unless you open your home directory to other users). Also the executable won't be in $PATH so when you run it you'll have to specify the full path

Code:
$ ~/myapps/name_of_software/bin/whatever
Installing software you've built from source in to it's own directory makes it easy to keep track of. If you want to get rid of it later, you just delete that directory. If you don't specify a prefix and run configure, make and make install all as root stuff will get written all over the place.
 
Old 04-10-2011, 09:16 AM   #18
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Quote:
Originally Posted by Ribo01 View Post
Hello y'all. I want to be corrected of am wrong, its all about learning. So if you want t install a program outside the package of your operating system eg Red hat rpm the steps goes does.
  1. ./configure
  2. make
  3. make install
from my understanding,the ./configure creates the makefile which the make utility reads from to know how to compile the binary for the software/program. Then after you use the make install to finally install. Note you have to be root. So please is the something I missed out? Also note this is for Red hat right ? Thanksa
That only applies to packages that use the Autotools build system. Other common ones include QMake:

Code:
qmake
make
make install
and CMake:

Code:
mkdir build
cd build
cmake ..
make
make install
(the reason for creating the directory is because CMake encourages "out-of-source building": instead of cluttering up the source directories with intermediate files (which would be a big hassle if you were a programmer trying to find the file you want to work on), it makes copies of the source directories and works on them.)

Some don't use a build system and just have a hand-written Makefile there already:

Code:
make
make install

Last edited by MTK358; 04-10-2011 at 09:24 AM.
 
Old 04-10-2011, 09:18 AM   #19
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Quote:
Originally Posted by arizonagroovejet View Post
Code:
$ ./configure --prefix=${HOME}/myapps/name_of_software
The "proper" way would be to add .local/bin to your $PATH and use the prefix $HOME/.local.

In case you're wondering, ~/.local is like /usr, but just for one user, not the whole system.
 
Old 04-10-2011, 09:32 AM   #20
CFet
Member
 
Registered: Mar 2011
Location: BC, Canada
Distribution: Slackware 13.1
Posts: 47

Rep: Reputation: 0
Quote:
Originally Posted by Ribo01 View Post
Ok, the software is John-1.7.6.tar.gz. So how so I go about installing it ?
Ribo, have you extracted it yet?

Code:
cd /location of software
tar -xzvf John-1.7.6.tar.gz
 
  


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
Howto remove old software and install new software in linux? gardenair Linux - Newbie 5 01-12-2011 09:41 PM
[SOLVED] Failure to install ordinary software from Ubuntu 10.04 Software Center jlavik Linux - Newbie 1 10-01-2010 10:50 PM
while install software i got error as software Linux Installer cannot be run as root mgbreddy Linux - Software 2 05-21-2010 01:22 AM

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

All times are GMT -5. The time now is 06:14 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