LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   install again from source (https://www.linuxquestions.org/questions/linux-newbie-8/install-again-from-source-730404/)

7mza 06-03-2009 09:19 AM

install again from source
 
i just want ask if i install program from source and i install it again without uninstall it using "make uninstall" .. is this way work fine to install again ?

jailbait 06-03-2009 10:00 AM

As a general rule the second install will overwrite the first install and everything will be OK.

--------------------
Steve Stites

bathory 06-03-2009 11:14 AM

jailbait is right, the new installation will overwrite the files from the previous one.
Note that if you are going to change any options in the ./configure script, you should prior running ./configure, to run "make clean" or "make distclean" to remove the files created from the previous build.

i92guboj 06-03-2009 11:38 AM

I have to respectfully disagree.

The only way to guarantee that the system will be correctly cleaned is to preserve the build tree, and do "make uninstall" before doing a new installation.

Bear in mind that if you use different configure options (for example, --prefix but there can be many more that can potentially leave crap in your system) files from previous installations will be left behind, and probably in a default path. This will later lead to problems of the kind "I have installed it 1000 times and it complains that it can't find a library, but I see it, and it is there". This problems are extremely hard to diagnose and solve, I've seen this like thousands of times, a tipical case is when users install the nvidia or ati drivers using their package manager, and then (for I-don't-know-what-reason) they reinstall them by hand using the nvidia or amd installer. This leads to cases where the kernel modules and the glx api will not match, and the price is a two weeks vacation fishing libraries all around your fs and wandering why the heck linux is that bad and crappy.

Besides that, when you update a package the newer versions will not necessarily use the same file set. Some files may no longer exist, some others might live in other place. In this case, leftovers are usually not dangerous, though still some problems can arise (and I am not considering relevant the disk space waste).

So, when you are going to update a package to a new version or you are going to use a different set of configure options, first, make sure that you uninstall properly before.

bathory 06-03-2009 04:20 PM

Quote:

i just want ask if i install program from source and i install it again without uninstall it using "make uninstall"
I think that OP wants to install the same version program recompiling it again. If that's the case, "make (dist)clean" before ./configure is ok to use (well unless the prefix is changed of course)
Building and installing a different version, should overwrite most of the files, but it can also leave some old ones(specially libraries). Even though "make install" should take care of symlinking the newest library files installed, with plain .so, it's good practice to run "make uninstall" if it's available to get rid of the unneeded old libraries.

Regards


All times are GMT -5. The time now is 03:28 PM.