You can also check your LD_LIBRARY_PATH environment variable, which should contain the path to the opencv library.