Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Troubleshooting "missing" library files that actually exist #36

Open
JeffMings opened this issue Jun 6, 2015 · 12 comments
Open

Troubleshooting "missing" library files that actually exist #36

JeffMings opened this issue Jun 6, 2015 · 12 comments

Comments

@JeffMings
Copy link

Hello!
This project is the only one that wants to compile under Centos 7 with a newer version of the TEMPerHum hardware. However, even though CMake compiles successfully and hid-query runs correctly, tempered throws a library file error:

tempered: error while loading shared libraries: libtempered.so.0: cannot open shared object file: No such file or directory

The files are in /usr/local/lib64:

[root@WardCamPC local]# pwd
/usr/local
[root@WardCamPC local]# ls -alh lib64
total 60K
drwxr-xr-x. 2 root root 4.0K Jun 5 15:10 .
drwxr-xr-x. 13 root root 4.0K Apr 27 17:56 ..
lrwxrwxrwx 1 root root 16 Jun 5 15:10 libtempered.so -> libtempered.so.0
-rwxr-xr-x 1 root root 36K Jun 5 15:09 libtempered.so.0
lrwxrwxrwx 1 root root 21 Jun 5 15:10 libtempered-util.so -> libtempered-util.so.0
-rwxr-xr-x 1 root root 13K Jun 5 15:09 libtempered-util.so.0

I tried making symbolic links int /usr/local/lib , but that didn't help.

How can I troubleshoot this?
Thanks!

@ajwittman
Copy link

I am also having the same issue when trying to run tempered:

tempered: error while loading shared libraries: libtempered.so.0: cannot open shared object file: No such file or directory

In addition, if I try to run hid-query I get the error:

hid-query: error while loading shared libraries: libhidapi-hidraw.so.0: cannot open shared object file: No such file or directory

When I do find / -name libtempered.so.0 I find the file in the following locations:

/usr/TEMPered/libtempered/libtempered.so.0
/usr/local/lib64/libtempered.so.0

I am running Centos 6.6. hidapi installed with no problems and I did not get any errors while compiling TEMPered.

@kronikabis
Copy link

I think Ubuntu it is looking in /lib
a quick and dirty was on my machine was
'ln -sf /usr/local/lib/x86_64-linux-gnu/libtempered.so.0 /lib/libtempered.so.0'
in your case 'ln -sf /usr/local/lib64/libtempered.so.0 /lib/libtempered.so.0'

But the problem is in the compiler script i believe

@ajwittman
Copy link

I tried the sym links and still no luck. Definitely seems like an error in the compiler script though... Were you able to find anything? I tinkered with it for a while, but couldn't find it.

@jpmorris
Copy link

sudo cp /usr/local/lib/x86_64-linux-gnu/libtempered* /usr/lib/x86_64-linux-gnu/

works for me (on ubuntu)

@KazimierzFreightliner
Copy link

You have to add /usr/local/ib/x86_64-linux/gnu/libtempered directory (or wherever libs are) to ldconfig.
To do this simply create file /etc/ld.so.conf.d/tempered.conf and put path to your lib directory there, one path in one line.

@endolith
Copy link

endolith commented Nov 3, 2016

@KazimierzFreightliner That doesn't work for me

~/t/TEMPered> la /usr/local/lib/libtempered*
lrwxrwxrwx 1 root root  16 Nov  2 23:55 /usr/local/lib/libtempered.so -> libtempered.so.0
-rw-r--r-- 1 root root 36K Nov  2 23:55 /usr/local/lib/libtempered.so.0
lrwxrwxrwx 1 root root  21 Nov  2 23:55 /usr/local/lib/libtempered-util.so -> libtempered-util.so.0
-rw-r--r-- 1 root root 14K Nov  2 23:55 /usr/local/lib/libtempered-util.so.0

~/t/TEMPered> cat /etc/ld.so.conf.d/tempered.conf
/usr/local/lib/libtempered.so.0

~/t/TEMPered> tempered
tempered: error while loading shared libraries: libtempered.so.0: cannot open shared object file: No such file or directory

@KazimierzFreightliner
Copy link

Well, sorry to hear that. Unfortunately my TEMPerHum has broken down. I've bought $10 digitemp-compatible replacement and this one is working OOB with "digitemp" centos package.

@endolith
Copy link

endolith commented Nov 3, 2016

@KazimierzFreightliner Can you link to what you bought?

@KazimierzFreightliner
Copy link

I've bought it here:
http://allegro.pl/termometr-usb-czujnik-temperatury-ds18b20-pl2303hx-i6542790166.html
It's Prolific PL2303HX USB-RS232 converter with DS18B20 thermometer.

@endolith
Copy link

endolith commented Nov 3, 2016

Ah it's not a humidity sensor. Ok, thanks.

@jeanrob98
Copy link

compiling and installing the tempered software puts the library files in /usr/local/lib (as mentioned above).
On a debian stretch (9) system, that directory will be searched (as per the /etc/ld.so.conf.d/libc.conf file).
But you have to run the 'ldconfig -v' command to actually make it register the newly installed libraries.
Once run, you can test that the loader has found the libraries by doing 'ldd tempered' and you will see that it found them (or not, depending).

@PrestonL
Copy link

I had the same problem and adding the library to /etc/ld.so.conf.d/tempered.conf and running ldconfig -v afterwards ended up working, I'm guessing something should be adjusted in the make files so that make install will end successfully without having to do this.

preston@paducahix-raspi:~# cat /etc/ld.so.conf.d/tempered.conf
/usr/local/lib/libtempered.so.0

preston@paducahix-raspi:~# ldconfig -v
 . . .
/usr/local/lib:
	libtempered-util.so.0 -> libtempered-util.so.0
	libtempered.so.0 -> libtempered.so.0
 . . .

preston@paducahix-raspi:~# tempered
/dev/hidraw1 0: temperature 27.11 °C
/dev/hidraw1 1: temperature 27.44 °C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants