LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-12-2006, 10:05 AM   #1
nadavvin
Member
 
Registered: May 2006
Distribution: ubuntu
Posts: 109

Rep: Reputation: 21
How can I compile and install software in completly separate directory?


I want to compile and install software completly in one directory.
--prefix install in over directory but it could also install in other places like etc.
I want also to minimize to zero the risk that the installation touch in other files in the system.

How can I do it?
 
Old 05-12-2006, 10:20 AM   #2
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Code:
make install DESTDIR=<install dir>
This is the notation used when I create my own SLackware packages. It will install everything into the sub directory you specify. Most newer make files support this option, but check to make sure before compiling or else it will just do a standard 'make install'. If you are using an older make file that does not support this option, you can set the install directory prefix for each type of file; etc, lib, bin, etc. Usually './configure --help' will give you the available options.

regards,
...drkstr
 
Old 05-12-2006, 10:45 AM   #3
nadavvin
Member
 
Registered: May 2006
Distribution: ubuntu
Posts: 109

Original Poster
Rep: Reputation: 21
Thanks it's good and simple solution.
 
Old 05-12-2006, 12:17 PM   #4
nadavvin
Member
 
Registered: May 2006
Distribution: ubuntu
Posts: 109

Original Poster
Rep: Reputation: 21
It's work perfectly.
I try it on vim.

-----------------------------------------------------------------
./configure --enable-gui=gtk,kde --prefix=/vim --enable-rightleft --enable-multibyte --with-features=big

make

make install DESTDIR=~/vim70
-----------------------------------------------------------------

pay attention to --prefix=/vim.
I didn't get any error or permission denied.

It's the first time that I succeed to install software in regular user.
The only problem that it installed in ~/vim70/vim.
So the next time I satisfied with --prefix=/
 
Old 05-12-2006, 01:24 PM   #5
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Yes, I should have explained that part. The main use for this command is for creating packages so it will install in the sub-directory like it is the root drive. (ie <install dir>/usr/local/<program>) You can then turn this into a package that installs everything in the sub directory to the / drive, making it easier to uninstall if you so desire.

You can change --prefix=/ if you want to, but sometimes programs will look for certain things in different directories and you could run into problems.

A good rule of thumb, if everything is installed in one directory (ie /usr/ or /usr/local) you will be fine setting '--prefix=/' if it wants to install in many different directories like '/etc' you should probably preserve the file structure in the install directory.

regards,
...drkstr
 
Old 05-12-2006, 02:13 PM   #6
nadavvin
Member
 
Registered: May 2006
Distribution: ubuntu
Posts: 109

Original Poster
Rep: Reputation: 21
do you mean without the use of "--prefix"?
 
Old 05-12-2006, 02:44 PM   #7
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Quote:
do you mean without the use of "--prefix"?
correct, leaving out the '--prefix' option will preserve the directory tree inside your install folder. alternativly, If you do not want a lot of sub directories in you install folder, you can just specify each prefix type to '/', but then all of the files will be placed together with no orginization, it just depends on how you want to do it.

But again, you will almost always be ok just setting '--prefix=/'

regards,
...drkstr
 
Old 05-13-2006, 10:56 AM   #8
nadavvin
Member
 
Registered: May 2006
Distribution: ubuntu
Posts: 109

Original Poster
Rep: Reputation: 21
I try it in the installation on lfs.
I special install the same make version that I have version 3.81
but It's not work.
I try make install DESTDIR=/pool/glibc-2.3.4
and it's Ignore from DESTDIR.

Also this flag don't sown in make --help.
and it's not shown in my debian make which I succeed to install vim.

The option not mention also in man make
What wrong?

Last edited by nadavvin; 05-13-2006 at 10:59 AM.
 
Old 05-13-2006, 11:09 AM   #9
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
as I mentioned before, not all make files will support this option. It will not be listed in the --help since it is not a regular argument, it is a variable that you are manually setting. You can usually check by opening up the config file and taking a look. You should be good to go if it has something like this:
...
DESTDIR =
prefix = \$(DESTDIR)$_prefix
BINDIR = \$(DESTDIR)$_bindir
DATADIR = \$(DESTDIR)$_datadir
MANDIR = \$(DESTDIR)$_mandir
CONFDIR = \$(DESTDIR)$_confdir
LIBDIR = \$(DESTDIR)$_libdir
...
If it doesnt, you can always add in support yourself (but I wouldn't recomen it unless you really know what your doing)

glibc might not support this option since it a system critical dependency that needs to be installed in the correct place for it to work, that's just a guess though.

regards,
...drkstr
 
Old 05-13-2006, 11:15 AM   #10
nigewilson
LQ Newbie
 
Registered: May 2006
Posts: 1

Rep: Reputation: 0
Hi Iam a pretty od feller & I have been used to Windows how do i set up email & browser & stuff on Linux please?
 
Old 05-13-2006, 07:09 PM   #11
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
Quote:
Hi Iam a pretty od feller & I have been used to Windows how do i set up email & browser & stuff on Linux please?
Welcome to LQ. I am glad that you are taking the next step to a windows free environment, however posting questions that are not relevant to the topic make it harder for people looking for answers, to find them. Please start a new thread in the "linux newbie" forum and you will get a greater response to your question.

regards,
...drkstr
 
  


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
How do I install software from local directory 10.1 beta8 1kyle SUSE / openSUSE 7 03-27-2006 08:42 AM
Migrate Directory to Separate Disk Partition Neapolitan Red Hat 1 01-18-2006 01:51 PM
How to install the software in a specified directory on a cd? anuode Solaris / OpenSolaris 1 09-17-2005 09:42 AM
software install directory shavak Linux - Newbie 10 02-03-2005 10:23 PM
give users permission to install software in their directory? ksgill Linux - Newbie 7 12-17-2003 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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