One option is to make a deb package.
Another option is to compile the application to a directory of its own. This is a good idea whenever you compile something without using a package manager. Most open source applications use automake and autoconf with typical configurations and default to installing under /usr/local
. You can usually configure the application to install to a different directory by passing --prefix=…
to the configure
script.
./configure --prefix=/usr/local/stow/myapp-4.2
make
make install
Stow is a program that manages symbolic links for packages installed in their own directory, so if myapp has a binary that gets installed as /usr/local/stow/myapp-4.2/bin/myapp
, running stow myapp-4.2
in the /usr/local/stow
directory will create a symbolic link to that binary in /usr/local/bin
. See Keeping track of programs for more information about stow.
Once you've installed the program in its own directory, you can easily build a zip or tar archive of it and unpack it on another machine. Run stow on the other machine as well.
Note that compiling a program on one system may produce executables that don't work on the other systems. Between two installations of the same version of the same distribution, you won't have any problem. But if the systems have different versions of shared libraries, the binary will sometimes not work on the other machine for lack of the required libraries. You can get around this by linking some libraries statically or by installing the right development packages on the build machine.
Create a deb package
orcompile it statically
. What dependency does this app need ? – daisy Apr 25 '12 at 02:16./configure --disable-shared
on the first computer, but it is already installed there and I don't want to change that installation. I'll leave it using shared libs there. So I guess the best bet is to make a deb package. Is that easy? – MountainX Apr 25 '12 at 02:39