Thread: C programming MQ error Clibmqm.so: cannot open shared object file

  1. #1
    Registered User
    Join Date
    Apr 2017
    Posts
    51

    C programming MQ error Clibmqm.so: cannot open shared object file

    I have the program, which we compile to connect to MQ remotely. It was compiled OK, but when I run it, got an error message:
    Code:
    error while loading shared libraries: libmqm.so: cannot open shared object file: No such file or directory
    but
    Code:
    /opt/mqm/lib64> ls -ltr libmqm.so
    -r-xr-xr-x 1 mqm mqm 17237 Nov 22  2016 libmqm.so
    
    :/usr/lib> ls -ltr libmqm.so
    lrwxrwxrwx 1 root root 24 Jun  9 18:18 libmqm.so -> /opt/mqm/lib64/libmqm.so
    Can somebody help me to understand, why the C executable cannot find this file?
    Last edited by digioleg54; 06-09-2017 at 12:28 PM.

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    You likely need to put /opt/mqm/lib64/ in the search path for executable libs.

    From Installing Code::Blocks from source on Linux - CodeBlocks

    To add it to the search path for libraries do the following (as root / using sudo respectively): Add the following line to the file /etc/ld.so.conf:
    ...and run:
    Code:
    ldconfig
    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Shared object between classes
    By drawar in forum C++ Programming
    Replies: 16
    Last Post: 10-05-2014, 08:52 AM
  2. keeping FILE* object open
    By nabat1 in forum C Programming
    Replies: 5
    Last Post: 02-03-2013, 04:46 AM
  3. Issue with .so (Shared Object) Files
    By in_ship in forum C Programming
    Replies: 15
    Last Post: 09-16-2012, 07:57 AM
  4. open file error
    By mr_empty in forum Windows Programming
    Replies: 22
    Last Post: 12-23-2007, 04:17 AM
  5. Open file name object
    By JJFMJR in forum Windows Programming
    Replies: 3
    Last Post: 09-14-2007, 05:44 PM

Tags for this Thread