How to update packages compiled from source?
When you install from source, there is nothing (like dpkg) that will track the newly installed files for you (what files and where they were placed). Unless you explicitly use a tool.
How to know where the files were installed
I use Git to track installations in my /usr/local. Here is how it looks:
cd /usr/local
git init
git add .
git commit -m "Starting to track /usr/local"
Install new software (./configure
, make
, make install
). And then:
cd /usr/local
git status
git add .
git commit -a -m "Installed open-magic-1.2.3"
Now you call see what files were installed and when:
cd /usr/local
git log --stat
If you are skillful with Git you can even do uninstalls with a few git commands. But be careful as Git does not track the file permissions (I wrote a special script that can save and restore all permission and ownerships to/from a files). I only did uninstalls a couple of times, even though I have 334 commits (e.i. installed) in my /usr/local.
Some people install software into dedicated directories and make symlinks or add the bin directories to PATH.
I started doing that too. I install sources with PREFIX set to /opt/open-science-1.2.3
(for example) and then make symbolic links to the bin files in my Git tracked /usr/local/bin
. What's really nice about that is I can pre-create the /opt/open-science-1.2.3
directory owned by non-root and then run make install
as non-root. This proves to me that the install script did not wire files anywhere in the system expect into /opt/open-science-1.2.3
.
The simple but messy way
Probably the easiest way to upgrade is to just re-install the new sources. Just do the installation procedure all over as if it is the first time. You may end up having some orphaned older files lying around. The software will run correctly but the orphaned files take up space make your setup messy.
Related videos on Youtube
Gedean Dias
Updated on September 18, 2022Comments
-
Gedean Dias over 1 year
I'm a newbie at on guard and I'm trying to limit some features using TPONGuard.
-
Gedean Dias over 13 yearsI'm trying Enable/Disable some of my software features based on TPOnGuard release code evaluete.
-
Rob Kennedy over 13 yearsYes, you said that already. But what is your question? What part of the task are you having trouble with?
-
-
Gedean Dias over 13 yearsthanks for the answer, but I think the almost questions asked here has answer in a manual, and if I asked here may be because I don't find it in a cleary way in the manual.
-
Admin over 13 yearsYou asked something that is explained in the manual. If you had a specific question I would have had a specific answer. If you had reached page 103 of the manual, you would have find something...