Skip to main content


Updating software that was installed using Make Install

!The Lazy Admin Club

If I've installed something using make install (in this case libmodsecurity) and I wish to update at a later date... do I need to do a make uninstall first? And then download the latest source files and go through the process again? Or can I just do another make install - will it just overwrite and update any files previously installed? What's best practice?

#linux #makeinstall #ubuntu #modsecurity

Better check the UPGRADE section of the software's README or UPGRADE file. If there is none, ask the devs in their forum or mailing list.

You should not use "make install". There are tools to build proper packages from sources, depending upon the distribution.

Often it's as simple as
mkdir PKG
make install DESTDIR=$PWD/PKG
cd PKG

sudo makepkg ../packagename.tar.gz

mkdir DEBIAN
cat >> DEBIAN/control <EOF
Package: packagename
Architecture: amd64
Maintainer: yourself
Description: Whatever
dpkg --build . ../packagename.deb

There is a tool I used that automatically can create tgz, rpm and deb packages but I can't get the name right now (I didn't use it for a long time).

That does look useful! Never heard of it before now. My only concern is that it hasn't had an update since 2016. Is it still maintained?

@Mark I dunno, I used to use it a few years ago, nowadays I use the simple method I presented to build proper packages by hand. :)

If you're using Debian it's in the stable main repo, so it works. Then on different distros YMMV.