LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-10-2004, 04:21 PM   #16
Chuck23
Member
 
Registered: Jun 2004
Distribution: Fedora Core1
Posts: 63

Rep: Reputation: 15

Yea!

But after you're finished reading, get Synaptic -- it figures out all the dependencies and makes installs EZ.
 
Old 08-11-2004, 05:55 AM   #17
kobayashy
LQ Newbie
 
Registered: Aug 2004
Location: Amsterdam
Posts: 8

Rep: Reputation: 0
Clarifications

Well, all this is really informative. I have not yet managed to install any package on my Linux system, but I already have a clearer view of the mechanism, issues, pros and cons.

If you allow me to sum up:

While Windows does everything, in Linux you have to do it manually (or with RPMs that work if you are lucky). You have to untarr the files, check whether you are able to install with ./configure, then compile with make, and finally dispatch the files with make install.

There are different directories involved: /usr/ or /usr/lib or /lib . I have yet never seen any of these in my file manager. Are they visible through the KDE graphical interface? If I go to the command prompt I guess I should be able to find them but how are these directory organised?
Is /usr/ parallel to /home/ ? What about /lib?

Suppose I know where my directories are. I am concerned about the /lib directory that contains all libs (equivalent of windows'dll's). These libs can be shared by several programmes, that is something you want to avoid I presume if you don't want to end up with a big knot of files and dependencies. Is there a simple trick to avoid these dependencies? Could you store your libs in /lib/package1/ for package 1 and lib/package2/ for package 2 ect..?

I also read you ought to verify your libs are up to date, how do you do that? I suppose you can end up with a huge amount of libs in your /lib directory.

Other thing, if you run make install, I understood it will dispatch the files here and there where they are supposed to be. Well, how does that work? Does make install uses the same process for all programs and throw each file type in their own directory? or does it depend on the package you install?

Thank you for clarifying all this.

Kobayashy
 
Old 08-11-2004, 06:30 AM   #18
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Re: Clarifications

Quote:
Originally posted by kobayashy

Suppose I know where my directories are. I am concerned about the /lib directory that contains all libs (equivalent of windows'dll's). These libs can be shared by several programmes, that is something you want to avoid I presume if you don't want to end up with a big knot of files and dependencies. Is there a simple trick to avoid these dependencies? Could you store your libs in /lib/package1/ for package 1 and lib/package2/ for package 2 ect..?

I also read you ought to verify your libs are up to date, how do you do that? I suppose you can end up with a huge amount of libs in your /lib directory.

Other thing, if you run make install, I understood it will dispatch the files here and there where they are supposed to be. Well, how does that work? Does make install uses the same process for all programs and throw each file type in their own directory? or does it depend on the package you install?

Thank you for clarifying all this.

Kobayashy
make install takes its instructions for the Makefile, specific to each program and written by either the program's author or the configure script. It isn't the same for every application. Some Makefiles may only install a binary and will put it in /usr/local/bin by default and others may have more to install and put it in /usr/local/<programname>. You can change where a program installs its files by running ./configure with the --prefix=<base directory> switch. For example. most configure scripts set the Makefile to install the program in /usr/local, but if you run ./configure --prefix=./usr it will put it in /usr instead (with the binary in /usr/bin).

And no, you don't want to avoid shared libraries. That's the whole reason they exist. If they were a bad thing then they wouldn't be used! Imagine how many applications use GTK...now if you were going to install the GTK libraries into a specific directory for each application then you'd have hundreds of instances of it installed! Shared libraries are a way of saving space. And don't worry about 'dependencies' with regards to having multiple versions installed, it doesn't work like that. A system of symbolic links means you can have many versions of the same library installed without ever causing problems with older programs.
 
Old 08-11-2004, 06:50 AM   #19
penguin4
Senior Member
 
Registered: May 2004
Location: california
Distribution: mdklinux8.1
Posts: 1,209

Rep: Reputation: 45
komakino; thanks for clearing knowledge, after reading those phrases in linux text books was dumb founded now it becomes clear. elucidated with
new vision thank you! this is what makes linux best , windows can not touch at all.
 
Old 08-11-2004, 07:10 AM   #20
kobayashy
LQ Newbie
 
Registered: Aug 2004
Location: Amsterdam
Posts: 8

Rep: Reputation: 0
Kokamino wrote:

You can change where a program installs its files by running ./configure with the --prefix=<base directory> switch. For example. most configure scripts set the Makefile to install the program in /usr/local, but if you run ./configure --prefix=./usr it will put it in /usr instead (with the binary in /usr/bin)


Yes thank you, it makes it indeed all clearer, now only one extra little thing:

If I ./configure with a --prefix, it will store my files in the directory I wish and in a /bin subdirectory for binary files. Now if I use that, will the Libraries be stored alltogether in the common /lib to all programmes? (And thus not making doubles as you mentionned?) Or will the prefixe affect these Libs too? (which I don't want since you convinced me not to separate them)

The first option would be a lot funnier of course !

Cheers,

Kob.

Last edited by kobayashy; 08-11-2004 at 07:12 AM.
 
Old 08-11-2004, 08:49 AM   #21
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Well in linux the programs get separated into library directories and binary directories (like /usr/lib and /usr/bin) anyway. The --prefix option doesn't change the exact installation directory, it just changes the base install directory. For example if you specify a prefix of /usr/local/myprograms/games then the libraries are still in /usr/local/myprograms/games/lib and the binary is still put in /usr/local/myprograms/games/bin. You can have finer control over this though. Type:
Code:
./configure --help | less
(that's the pipe symbol, found next to backspace on a US keyboard) to see what configuration options there are. Sometimes you can specify the exact location you want to install the complete program, but:

1. If you put the binaries in a directory that is not in your path then you will have to type the complete path to load the program, or put a symlink in a directory that IS in your path, or add the directory to your path.
2. If you put libraries in a non-standard location then they won't be in the LD_LIBRARY_PATH so the linker won't find them.
3. Also, if you put libraries in a non-standard location then pkg-config won't find them so configure scripts that use pkg-config to determine what libraries are installed won't find them.

What I usually do (and this is just me, it's not a rule or anything) is I install any libraries that are likely to be used by other programs (things like GTK, Qt, Freetype...) in /usr/lib (by specifying ./configure --prefix=/usr) and any programs (like games, applications...) in /usr/local (the default location for a configure script).
 
  


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
Solution Dual Boot Windows & Linux [ALL DONE IN WINDOWS] No Linux terminology DSargeant Linux - Newbie 35 02-07-2006 03:29 PM
Solution Dual Boot Windows & Linux [ALL DONE IN WINDOWS] No Linux terminology DSargeant Linux - Newbie 4 11-10-2005 11:37 AM
Vnc only works linux to windows not windows to linux mbdayton Linux - Networking 2 04-16-2005 06:36 PM
Red Hat Linux 9 + Windows Server 2003 + Windows XP + Fedora in same domain wolfy339 Linux - Networking 5 03-02-2005 06:03 AM
Samba - Linux box can see Windows, but WIndows can't see Linux Korff Linux - Networking 1 06-02-2003 10:23 AM

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

All times are GMT -5. The time now is 07:32 AM.

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