If you get the error while loading shared libraries error

 

How to add a shared library
step1
/etc/ld.so.conf.d
in the directory of
libslabhiddevice.conf
Create a file with the following content.
/usr/lib/x86_64-linux-gnu/libslabhiddevice
 
similarly
/etc/ld.so.sonf.d
in the directory of
libslabhidtosmbus.conf
Create a file with the following content.
/usr/lib/x86_64-linux-gnu/libslabhidtosmbus
 
step2
/LensConnect_Controller/CP2112/lib/x86_64
It is in
libslabdevice.so.1.0 and libslbahidtosmbus.so.1.0
Copy to /usr/lib/x86_64-linus-gnu
$ cd CP2112/lib/x86/64
$ sudo cp libslabhiddevice.so.1.0 /usr/lib/x86_64-linux-gnu
$ sudo cp libslabhidtosmbus.so.1.0 /usr/lib/x86_64-linux-gnu
 
step3
Create a symbolic link as shown below and run sudo ldconfig.
$ cd /usr/lib/x86_64-linux-gnu
$ sudo ln -s libslabhiddevice.so.1.0 libslabhiddevice.so.1
$ sudo ln -s libslabhiddevice.so.1.0 libslabhiddevice.so
$ sudo ln -s libslabhidtosmbus.so.1.0 libslabhidtosmbus.so.1
$ sudo ln -s libslabhidtosmbus.so.1.0 libslabhidtosmbus.so
$ sudo ldconfig
 
step4
If the library is displayed in the command below, it should be linked.
$ ldconfig -p | grep slab
libslabhidtosmbus.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libslabhidtosmbus.so.1
libslabhidtosmbus.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libslabhidtosmbus.so
libslabhiddevice.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libslabhiddevice.so.1
libslabhiddevice.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libslabhiddevice.so

step5
In the directory containing the executable file
$ sudo ./LensConnect_Controller
If you run it, it will display correctly.
 
If you have defined rules, sudo can be omitted.
$ ./LensConnect_Controller