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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-02-2005, 12:24 PM
|
#1
|
LQ Newbie
Registered: Dec 2004
Location: Suffolk, England
Distribution: SuSe 9.1
Posts: 2
Rep:
|
pointers needed about installing/compiling from source
Hi y'all, i just recently installed suse 9.1 (dual booted with win xp pro on 2 HDs) and as a complete linux beginner, i want to learn about installing stuff from .gz or .bz2 files. I know how to install .rpm files.
I know how to unzip these files, and i know the usual './compile' and 'make' and 'make install' commands. However, i have read different things from various sources.
Should i run a 'make clean' after the install? I've heard this would clean out all the files used to install the software, and also that it would delete files that are actually installed! Some clarification would be useful.
Secondly, do i need to keep the directory that i compiled the stuff from? Can i change the folder name to something that i can navigate easier? Can i move this folder?
Any answers to these questions (and any that logically follow) would be appreciated,
Richard
|
|
|
01-02-2005, 12:29 PM
|
#2
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
hi
this is from my help page that i wrote for m LUG
--------
Source packages generally come in 2 compressed formats
xmms-1.2.10.tar.bz2 --compressed with bunzip(bzip)
xmms-1.2.10.tar.gz --compressed with gunzip(gzip)
and others also
1.)first of all we need to extract these packages .
so copy the packages in your Linux partition. for example in /plugins directory.
go to that directory and extract them as follows
[root@gaurav root]# cd /plugins/
[root@gaurav plugins]# tar xjf xmms-1.2.10.tar.bz2
[root@gaurav plugins]#
OR
[root@gaurav root]# cd /plugins/
[root@gaurav plugins]# tar xvzf xmms-1.2.10.tar.gz
[root@gaurav plugins]#
here we pass the arguments
xjf --for uncompressing packages of the type (.tar.bz2)
xvzf --for uncompressing packages of the type (.tar.gz)
more on these attributes can be found by
[root@gaurav root]# man tar
if the packages are in some another format then u can extract them also by
a.)copy the package in your Linux partition
b.)Right click on the package
c.)choose extract here
this method surely takes some time more that the command line version but if you are having any problems in extracting with the command line then u may proceed in this manner
2.)after packages have been extracted then u need to compile them and then install these.
you can go through a file Readme or INSTALL
in all the install readme files you will find the procedure for installing source packages
I am briefing the procedure down here
a.) go to the directory containing the extracted packages
[root@gaurav root]# cd /plugins/xmms-1.2.10
[root@gaurav xmms-1.2.10]#
b.) './configure' will check if the files necessary for installation are available or not
[root@gaurav xmms-1.2.10]# ./configure
c.)' make' will compile the package
[root@gaurav xmms-1.2.10]# make
d.)'make install' will install the executable in '/usr/local/bin' (generally)
after these you can run your new packages by their name only or by giving the full path
[root@gaurav xmms-1.2.10]# xmms
OR
[root@gaurav xmms-1.2.10]# /usr/local/bin/xmms
-------
|
|
|
01-02-2005, 12:35 PM
|
#3
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
When you do a make, the compiler creates the software ( and or libs ) in the folder with the sources.
When you do make install, it then copies these files from this folder, to your system.
If you do make clean, it removes the compiled software from the original source directory, it does not uninstall the software.
Moving or renaming the source directory should not be a problem you may have to redo the ./configure thats all. It should have absolutley no effect on the installed software.
The reason you do make, then make install, is because usually you need to be root to install the software, but not to compile it.
|
|
|
01-02-2005, 12:38 PM
|
#4
|
Senior Member
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,832
Rep:
|
Yes.
"Make clean" actually good command to repell allthe temps and all..
Also before installing the same package again, in case if smth went wrong, recommended to run
#make uninstall
from initial install directory
Happy compiling!
|
|
|
01-02-2005, 12:39 PM
|
#5
|
LQ Newbie
Registered: Dec 2004
Location: Suffolk, England
Distribution: SuSe 9.1
Posts: 2
Original Poster
Rep:
|
masand, i probably didnt make it clear enough, but i said i knew how to do that - i was asking about the 'make clean' command, and about changing the directory that i had compiled the app from. thanks anyway.
EDIT: Another thing, when i install the programs, do i have to update the libraries? I read somewhere that i night need to run 'libtool' or something, but i'm not entirely sure.
Richard
Last edited by PenguinE; 01-02-2005 at 12:42 PM.
|
|
|
01-02-2005, 01:19 PM
|
#6
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
hi there
when u install a 3rd party tool then too make sure that the path of the libraries , etc is in ur path do this
add the path to ur
/etc/ld.so.conf
for example u have the lib in /usr/local/lib
then add the line
/usr/local/lib/
to the above file and run
ldconfig
this will put the /usr/local/lib in ur path
regards
|
|
|
All times are GMT -5. The time now is 05:03 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|