How can I compile and install software in completly separate directory?
Linux - SoftwareThis 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
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.
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.
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.
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.
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=/
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.
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=/'
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.