Linux – how to find a missing library

So you are compiling an application for installation and it fails with a missing file.  For example:  libnotify/notify.h

UBUNTU SOLUTION:

  1. sudo apt-get install apt-file
  2. sudo apt-file update
  3. apt-file search file_name_to_search_for

i.e.,:    apt-file search  libnotify/notify.h

gives:

libnotify-dev: /usr/include/libnotify/notify.h

so install libnotify-dev:  sudo apt-get install libnotify-dev

FEDORA SOLUTION:

  1. suppose you are missing the file “ld-linux.so.2″
  2. yum provides ld-linux.so.2

this will produce the following:

Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
glibc-2.12.90-17.i686 : The GNU libc libraries
Repo        : fedora
Matched from:
Other       : ld-linux.so.2

glibc-2.12.90-21.i686 : The GNU libc libraries
Repo        : updates
Matched from:
Other       : ld-linux.so.2

yum provides */unistd.h
this will list every package containing “unistd.h”

Leave A Reply

Your email address will not be published. Required fields are marked *

*

Bad Behavior has blocked 592 access attempts in the last 7 days.