check-missing-liblinks.pl 350 B

12345678910111213141516171819202122
  1. #!/usr/bin/perl -w
  2. #
  3. use strict;
  4. my @dirs = qw(/usr/lib64/ /lib64/);
  5. my %checked;
  6. for my $dir (@dirs)
  7. {
  8. my @files = `ls $dir/*.so*`;
  9. for my $file ( @files )
  10. {
  11. chomp $file;
  12. my $base = $file;
  13. $base =~ s/so\.(.*?)$/so/g;
  14. next if exists $checked{$base};
  15. $checked{$base} = 1;
  16. if ( ! -f $base ) {
  17. print "missing base $base\n";
  18. }
  19. }
  20. }