-2

Consider I have a binary executable file (like ffmpeg). Can I just copy that file to another machine running Ubuntu for using it? Will it just work or might it face problems?

8
  • Many executable files depend upon the existence of other libraries, applications, config files, etc. If the application expects to find those dependencies, and they are missing, then the application might crash unexpectedly. This is why most software is packaged, clearly including --or directly referencing-- those dependencies.
    – user535733
    Feb 18, 2023 at 18:59
  • Yes was thinking the same. So there's no way to create a stable portable file? Feb 18, 2023 at 19:01
  • Sure there is. There are several. But that's not the broad, hypothetical question you asked above. If you have a specific question, open a new question asking that with details.
    – user535733
    Feb 18, 2023 at 19:07
  • 1
    @jameshofer to be independent of external libraries, an executable would need to be statically linked rather than dynamically linked at build time. Feb 18, 2023 at 19:08
  • Thanks guys. Yes it's a different topic. I prefer to search on web, rather than opening a new question. I might find a solution. @user535733 I think your comment is needed as an answer cause it's useful. Feb 18, 2023 at 19:10

1 Answer 1

2

If other machines have the same architecture, e.g. amd64, then you can use binary executable files without any problems.

But obviously if the binary requires some libraries, or something else to run, it may throw errors and quit.

5
  • 1
    I would not agree with your statement. Because it is entirely dependent on the version of libraries installed on each machine to determine if a portable executable will actually function when moved to another system post-compilation.
    – Thomas Ward
    Feb 18, 2023 at 19:25
  • Well, you are correct in general. But the question is too general as well. Any binary will run, but it may have errors if something is missing.
    – Pilot6
    Feb 18, 2023 at 19:26
  • 1
    then I would suggest that the question is "too broad" to be answered properly here and should be closed, not answered.
    – Thomas Ward
    Feb 18, 2023 at 19:51
  • I agree............
    – Pilot6
    Feb 18, 2023 at 19:56
  • you could find the other libraries via - unix.stackexchange.com/a/120017 - or the other, say, config files by dpkg -L $package_name
    – Dave Ankin
    Feb 19, 2023 at 11:17

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