0

I have a set of command line programs that depend on a set of shared libraries. They are called quite often, so in any given second it is likely that one of these programs will be launched.

When I "yum install" a new set of libraries, it often happens that the launch of one of these program will fail with the message

error while loading shared libraries: foo.so.0: cannot open shared object file: No such file or directory

a few moments later, everything is fine again, but the script that might have been running for a few hours has failed.

It sometimes reports several missing libraries, suggesting that yum is not installing them one at a time.

We've recently switched versions of Linux, and therefore yum. This happened only rarely with Centos6 and yum 3.2.29, but much much more often with Linux 4.1.17 and yum 3.4.3.

Is there anything that can be done to ameliorate this behavior? To minimize the amount of time during which a library is missing?

larsks
  • 277,717
  • 41
  • 399
  • 399
Andy Jewell
  • 413
  • 3
  • 12
  • `Linux 4.1.17` is not a thing that means anything. Do you mean `CentOS 7`? (Not that this likely matters much.) – Etan Reisner Apr 04 '16 at 18:40
  • 1
    You are upgrading a bunch of files. They cannot be upgraded as an atomic unit (unless they occupy a directory all to themselves). Your script/process needs to handle this fact by being able to pause or similar when upgrades need to occur or by not upgrading during the running of the long-lived process. – Etan Reisner Apr 04 '16 at 18:42
  • I don't need them to be upgraded as an atomic unit. I just need some version of each library to exist. – Andy Jewell Apr 05 '16 at 13:42
  • If the libraries aren't related and don't need to be internally consistent then perhaps they should be separate packages... but that's a digression for another time. I don't believe rpm replaces files atomically and your experience seems to indicate that that is true. I don't believe you can get it to do that (though it might be possible I suppose). That said I think this is really just a coordination issue and your processes need to handle this situation better. – Etan Reisner Apr 05 '16 at 14:58

0 Answers0