Cannot load the LJM library libLabJackM.so. | LabJack
 

Cannot load the LJM library libLabJackM.so.

5 posts / 0 new
Last post
proj964
jonhp's picture
Cannot load the LJM library libLabJackM.so.

[email protected]:/usr/local/lib$ sudo python Python 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from labjack import ljm : Cannot load the LJM library libLabJackM.so. libLabJackM.so: cannot open shared object file: No such file or directory >>>

 

[email protected]:/usr/local/lib$ ls libLabJackM.so libLabJackM.so.1 libLabJackM.so.1.18.3 python2.7 python3.5

LabJack Support
labjack support's picture
Here are a couple of things

Here are a couple of things to check:

1. Check that you have the correct LJM build installed. Run the following by command line:

uname -a

And provide the results. Which LJM installer did you use?

2. Try reinstalling the LJM library and double check if there were errors during installation.

3. Does ls -l /usr/local/lib/libLabJackM.so* show that libLabJackM.so points to libLabJackM.so.1 which points to libLabJackM.so.1.18.3?

4. Run the following command:

grep /usr/local/lib /etc/ld.so.conf

Does it find /usr/local/lib successfully?

5. Which version of Python_LJM did you install?

proj964
jonhp's picture
[email protected]:/usr/local

[email protected]:/usr/local/lib$ uname -a Linux lin02server 4.14.0-0.bpo.2-amd64 #1 SMP Debian 4.14.7-1~bpo9+1 (2017-12-22) x86_64 GNU/Linux [email protected]:/usr/local/lib$ [email protected]:~/Downloads/LabJack$ ls labjack_ljm_software_2018_05_15_i386 Python_LJM_2018_02_23 labjack_ljm_software_2018_05_15_i386_0.tar.gz Python_LJM_2018_02_23.zip [email protected]:~/Downloads/LabJack$ ls -l /usr/local/lib/libLabJackM.so* lrwxrwxrwx 1 root staff 31 Oct 2 14:12 /usr/local/lib/libLabJackM.so -> /usr/local/lib/libLabJackM.so.1 lrwxrwxrwx 1 root staff 36 Oct 2 14:12 /usr/local/lib/libLabJackM.so.1 -> /usr/local/lib/libLabJackM.so.1.18.3 -rwxr-xr-x 1 root staff 5810544 Oct 2 14:12 /usr/local/lib/libLabJackM.so.1.18.3 [email protected]:~/Downloads/LabJack$ grep /usr/local/lib /etc/ld.so.conf /usr/local/[email protected]:~/Downloads/LabJack/Python_LJM_2018_02_23$ sudo python setup.py install [sudo] password for jon: running install running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/labjack copying labjack/__init__.py -> build/lib.linux-x86_64-2.7/labjack creating build/lib.linux-x86_64-2.7/labjack/ljm copying labjack/ljm/ljm.py -> build/lib.linux-x86_64-2.7/labjack/ljm copying labjack/ljm/errorcodes.py -> build/lib.linux-x86_64-2.7/labjack/ljm copying labjack/ljm/constants.py -> build/lib.linux-x86_64-2.7/labjack/ljm copying labjack/ljm/__init__.py -> build/lib.linux-x86_64-2.7/labjack/ljm running install_lib creating /usr/local/lib/python2.7/dist-packages/labjack creating /usr/local/lib/python2.7/dist-packages/labjack/ljm copying build/lib.linux-x86_64-2.7/labjack/ljm/ljm.py -> /usr/local/lib/python2.7/dist-packages/labjack/ljm copying build/lib.linux-x86_64-2.7/labjack/ljm/errorcodes.py -> /usr/local/lib/python2.7/dist-packages/labjack/ljm copying build/lib.linux-x86_64-2.7/labjack/ljm/constants.py -> /usr/local/lib/python2.7/dist-packages/labjack/ljm copying build/lib.linux-x86_64-2.7/labjack/ljm/__init__.py -> /usr/local/lib/python2.7/dist-packages/labjack/ljm copying build/lib.linux-x86_64-2.7/labjack/__init__.py -> /usr/local/lib/python2.7/dist-packages/labjack byte-compiling /usr/local/lib/python2.7/dist-packages/labjack/ljm/ljm.py to ljm.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/labjack/ljm/errorcodes.py to errorcodes.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/labjack/ljm/constants.py to constants.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/labjack/ljm/__init__.py to __init__.pyc byte-compiling /usr/local/lib/python2.7/dist-packages/labjack/__init__.py to __init__.pyc running install_egg_info Writing /usr/local/lib/python2.7/dist-packages/LJMPython-1.18.0.egg-info [email protected]:~/Downloads/LabJack/labjack_ljm_software_2018_05_15_i386$ sudo ./labjack_ljm_installer.run [sudo] password for jon: Creating directory labjack_ljm_software Verifying archive integrity... All good. Uncompressing LabJack software for T4s, T7s, and Digits for Linux i386.............................................................................................................................................................................................................................................................. Installing libLabJackM.so.1.18.3 to /usr/local/lib... done. Installing LabJackM.h to /usr/local/include... done. Installing constants files to /usr/local/share... done. Installing labjack_kipling to /opt... done. Installing command line short-cut labjack_kipling to /usr/local/bin... done. /usr/local/lib >> /etc/ld.so.conf Adding LabJack device rules... done. restarting the device rules... done. Install finished. Please check out the README for usage help. If you have any LabJack devices connected, please disconnect and reconnect them now for device rule changes to take effect.

LabJack Support
labjack support's picture
You have a 64-bit Linux

You have a 64-bit Linux distribution (x86_64), and used the 32-bit LJM installer (i386). For 64-bit Linux, you need to use the 64-bit version of the LJM library. Please download the Linux 64-bit installer and run it:

https://labjack.com/support/software/installers/ljm

The 64-bit installer file name will have "x86_64" in it. Afterwards LJM Python should find and load the 64-bit libLabJackM.so.

proj964
jonhp's picture
Thanks, that appears to have

Thanks, that appears to have fixed the problem.