Whenever it is possible, I try to use applications, libraries and plugins delivered through official Ubuntu APT.
However, sometimes I try to compile something, like resynthesizer
plugin for GIMP. In many cases compilation requires me to execute sudo make
and sudo make install
. Without that, scripts fails, because they tries to copy files to folders that root has permission.
Since I am not the author of the program, I'm really afraid to do so (to execute such scripts as superuser). I am afraid that it will break the system. Is it possible to safely compile programs without using sudo
?
It's always possible to compile software "locally" under your own home directory - how easy it is to install and run locally depends on the software's developers.
For opensource software that uses the familiar
automake
recipe ofthe
configure
script should normally provide a--prefix
option that sets the root of the installation path - for examplewill cause generated binary files to be installed to the invoking user's
~/bin
, libraries to~/lib
, configuration files to~/etc
and so on. The directories will be created automatically if the do not already exist.In the particular case of the gimp resynthesizer plugin however, the
make install
step apparently still tries to install a couple of files to$(GIMP_LIBDIR)/plug-ins
, whereGIMP_LIBDIR = /usr/lib/gimp/2.0
is hardcoded instead of derived from the--prefix
value.This may be an oversight by the software's maintainers, or may be for compatibility with GIMP itself. However you can overcome it by modifying the recipe as follows:
which should result in the following plug-in directory structure: