11

I've installed the program Motion on one Linux machine (M1) and want the same program on another (M2).

There are various builds of this program, and I have forgotten which one I have used, so can I do a straight copy of the user/bin/motion file from M1 and place it in the user/bin/motion of M2?

I know where the configuration file is, so I'll move that across, but I'm not sure on what video drivers the working version of motion uses on M2; is there any way of finding out?

Is there a way that I can find out its dependencies?

7
  • Just for the record, this is almost always a bad idea. One of Linux's huge advantage over other platforms is package management. Manually copying binaries into system directories circumvents the package manager. In many cases, this just means updating the binary will need to be manual, but in some cases, this can cause system updates significant issues. TL;DR: use your package manager.
    – HalosGhost
    Oct 10, 2014 at 17:21
  • Sounds logical, so how would I do this task using dpkg?
    – reggie
    Oct 10, 2014 at 17:28
  • If the package providing the tool you want is truly not available for your OS, then you would create a package for it (it's less difficult than it sounds). Then, you would install the package with dpkg.
    – HalosGhost
    Oct 10, 2014 at 17:30
  • I'm not sure what you mean. Could you make a package from an already installed program?
    – reggie
    Oct 10, 2014 at 17:37
  • No, packaging is a separate process; but learning it is an invaluable skill. It is distro-(or at least package manager)-specific though.
    – HalosGhost
    Oct 10, 2014 at 17:39

1 Answer 1

12

For moving one program to other computer you have to move:

1) Executable file
A simple way to finding commands path is type command.

For example: type cal

cal is /usr/bin/cal

2) Library dependencies
You can find library dependencies with ldd command, But remember if you compiled a program from source the CPU Architecture of both server must be the same.

For example: ldd date

linux-vdso.so.1 => (0x00007fff83dff000)
librt.so.1 => /lib64/librt.so.1 (0x0000003784e00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003783e00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003784200000)
/lib64/ld-linux-x86-64.so.2 (0x0000003783a00000)

3) Configuration files
In new server you may need to tell the program to re-create the configuration files because that configuration files belongs to previous server.

4) Checking hardware dependency
For checking this I think you have to check program's website for supporting hardwares or you have to test program in new environment.

3
  • How do I find where the executable is stored? I think its in user/bin/ called motion. It runs at machine boot, so could this give me any clues as to where the executable is stored?
    – reggie
    Oct 10, 2014 at 6:09
  • @reggie, type command is a simple way.. I edited my post. Oct 10, 2014 at 6:15
  • good post. on Centos 6 it had to declare the full path of the executable ldd /bin/date linux-vdso.so.1 => (0x00007ffd71fa7000) librt.so.1 => /lib64/librt.so.1 (0x00007f9d37fcc000) libc.so.6 => /lib64/libc.so.6 (0x00007f9d37c38000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9d37a1b000) /lib64/ld-linux-x86-64.so.2 (0x00007f9d381d4000) Mar 29 at 2:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .