omni
Posts: 4
Joined: Tue Feb 19, 2013 4:15 pm

New to Pi! - libusb not found

Tue Feb 19, 2013 5:02 pm

Hi! I am trying to use my Raspberry Pi to poll a 1wire temperature network.

1. I am using a 1wire usb dongle (DS9490R) and OWFS (one wire file system) to successfully read the temperatures of my sensors.

2. I would like to instead use a program called W1Retap (http://sourceforge.net/projects/w1retap/) to automatically poll the sensors and write values to a MySql DB. I have seen posts of people who have got this to work on the pi (http://www.zen35309.zen.co.uk/wx/tech.html).

3. The install of W1Retap seems straight forward (http://www.zen35309.zen.co.uk/wx/w1retap.pdf) and is only three commands :

Code: Select all

./configure 
make
sudo make install
4. During the ./configure I am seeing an error which is the following:

Code: Select all

...
checking for LIBUSB... no
configure: error: Package requirements (libusb) were not met:

No package 'libusb' found
...
5. I have tried installing LIBUSB:

Code: Select all

wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2
tar xjf libusb-1.0.9.tar.bz2
cd libusb-1.0.9
./configure
make
sudo make install
This worked just fine, no errors

6. Even after a reboot I still get the same error when trying to run the w1retap ./configure.

7. I am familiar with linux but fairly new to compiling programs in the OS.

Any help would be greatly appreciated!
Cheers.

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: New to Pi! - libusb not found

Tue Feb 19, 2013 9:41 pm

Good choice on w1retap. Which distro are you using? Rapsian I guess, as w1retap is in the Arch AUR, and would fix the dependencies.

In any case, I would recommend you use the distro package manager to install the libusb development package.

Code: Select all

apt-get install libusb-dev
The reason why w1retap failed to find your source build is because its pkg-config is in /usr/local vice /usr (you should use distro packages where possible). Actually, I'd recommend you also remove the home built one, so as not to have multiple library versions, hopefully the following will do that:

Code: Select all

cd /path/to/libusb/build
sudo make uninstall
btw I'm the author of w1retap, I don't visit here often, so if you need further help, you can alway email me at the address in the w1retap documentation (and then publish your findings here, of course).

omni
Posts: 4
Joined: Tue Feb 19, 2013 4:15 pm

Re: New to Pi! - libusb not found

Fri Feb 22, 2013 2:11 am

My first question posted to the forum and not only do I get a response the same day, the response is written by the author of the software I'm trying to install. Wow.

Spenning - good choice on w1retap indeed, it comes with great tech support! I thought of contacting you for help but decided that my question didn't have much to do with your software, more a general Linux question. Either way you were bang on and I now have w1retap installed and I can successfully find the sensors on my mico lan.

I have now moved on to configuring the software to send the sensor values to a MySql DB (I have already created the db and tables). At this point I can't find the config files (~/.config/w1retap/rc or etc/default/w1retap) that are mentioned on page 15. Am I suppose to create them?

Thanks again!

(Does this count as high-jacking my own post?)

User avatar
spennig
Posts: 84
Joined: Mon Aug 29, 2011 11:34 am
Location: New Forest
Contact: Website

Re: New to Pi! - libusb not found

Fri Feb 22, 2013 8:36 pm

(Does this count as frequenting this forum more frequently than I previously claimed?)

You need to create the files.

win32hack
Posts: 1
Joined: Sun Jan 11, 2015 5:35 pm

Re: New to Pi! - libusb not found

Sun Jan 11, 2015 5:40 pm

Hi,
Also if you get this error on compilation:

Code: Select all

configure: error: "udev support requested but libudev not installed"
you can configure on library compilation using:

Code: Select all

$ ./configure --disable-udev
cheers!

User avatar
rpdom
Posts: 15581
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: New to Pi! - libusb not found

Sun Jan 11, 2015 7:03 pm

Replying to a nearly two year old post!! :lol:

Why not just install the correct library?

Code: Select all

sudo apt-get install libudev-dev

jacksonkr
Posts: 2
Joined: Wed Mar 30, 2016 6:19 pm

Re: New to Pi! - libusb not found

Wed Apr 13, 2016 9:57 pm

win32hack you are my hero.

Return to “General programming discussion”