LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to upgrade / reinstall software from source (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-upgrade-reinstall-software-from-source-277268/)

merlin23 01-13-2005 06:08 AM

How to upgrade / reinstall software from source
 
Is there a way of deinstalling a package that I have compiled myself?
I want to do a recompile and I am not sure if everything gets overriden when I just make a new make and make install...
Do I have to delete all files befor manually?

__J 01-13-2005 06:14 AM

what distro?

merlin23 01-13-2005 06:22 AM

I have a Mandrake 10 installation, with newest gcc (I think 3.3.2 )
Does it make a difference on which distro if I compile from source?

__J 01-13-2005 06:27 AM

A little. One option is to keep the source directories around (after you make install you can run "make clean" in the source directory to get rid of the objects and executables to save a little space) but there are more options. The best in my opinion is to make an rpm of your build so you can just remove the rpm if you want to install/upgrade. Checkinstall will make an rpm for you ( Check/read the docs, I have not used this on an rpm distro) of the build that you can install. I'm sure there are other programs out there that can do the same ( maybe better).

reddazz 01-13-2005 06:28 AM

If you have everything that a package needs to compile then it doesn't matter what distro you try to compile the package on, it should just compile. As for uninstalling, I usually don't uninstall coz sometimes you can break things, but it's just my :twocents:

__J 01-13-2005 06:32 AM

The reason for the distro question was some are easier than others and some have no package management at all. rpm, debs, and tgz's are all pretty easy to keep up with and manage/create/upgrade
etc... But if you were runnin say linux from scratch then its a little different.

merlin23 01-13-2005 06:46 AM

thanx for the quick answers...
so, how I understand this, I can just make a make clean, and all files I had previoulsy installed get deleted?
And if not, it doesn't make any difference, because a new make && make install will simply override the files...

__J 01-13-2005 06:56 AM

Sorry, I confused you.

"make clean" deletes the objects files (the .o files) and executables from the source directory. So if you wanted to keep the source around (to uninstall it (see below) ) make clean would free up a little disk space.

after you do "make install" and install to the file system, if you go back to the source directory and do "make uninstall" it will uninstall whatever was installed.

So basically, if you keep the source directory around, "make uninstall" is what you want to use.

You can generally overwrite installs and be fine (but its not guaranteed). This is the standard procedure for some packages like glibc.

you might want to check checkinstall and see if it will work for you. It's pretty painless and makes it easy for upgrades/removals (I've used it on Slackware and Debian but not on an rpm distro). to use it just do your normal:

./configure
make

but instead of make install do:
checkinstall

and it will make an rpm for you.

reddazz 01-13-2005 07:04 AM

I agree with __J checkinstall would be a good tool to use to create your own packages from source. I have never used it on an rpm based distro coz I can make my own rpms but on slack, it works like a wonder. If you have a lot of hard disk space it doesn't hurt to keep the sources around.


All times are GMT -5. The time now is 04:01 PM.