On 07/03/2015 at 10:42 AM, Stephen Rasku wrote:
> I have a package that depends on `libusb` but it's not detecting that
> it's installed.
>
> # dpkg-query -s libusb
> dpkg-query: package 'libusb' is not installed and no information is
> available
> Use dpkg --info (= dpkg-deb --info) to examine archive files,
> and dpkg --contents (= dpkg-deb --contents) to list their contents.
This is because there is no package named 'libusb'.
> However, if I list all the packages and grep for `libusb` I can find it.
>
> # dpkg-query -l | grep libusb
> dpkg-query -l | grep libusb
> ii libusb-0.1-4:amd64 2:0.1.12-25
> amd64 userspace USB programming library
> ii libusb-1.0-0:amd64 2:1.0.19-1
> amd64 userspace USB programming library
As this shows, the packages you want are named 'libusb-0.1.4:amd64' and
'libusb-1.0-0:amd64'. You need to pass the full package name to your
dpkg-query invocation.
> What gives? How can I get this to detect these `libusb` libraries?
> I have the source for the package I am trying to install so I can modify
> the meta-information if that's necessary.
>
> This is the Depends section of the package I am trying to install:
>
> Package: my-package
> Architecture: any
> Depends: ${shlibs:Depends}, ${misc:Depends}, libusb, fxload
> Description: <insert up to 60 chars description>
You need to use the full package name, not just 'libusb'. In this case,
you can (and should) omit the ':amd64' part. So, assuming that either of
the two libusb versions will work for your package, what you want is:
Package: my-package
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libusb-1.0-0 |
libusb-0.1-4, fxload
Description: <insert up to 60 chars description>
If the two libusb-* packages had a 'Provides: libusb' stanza, you would
be able to use the simple 'libusb' package name, but since they don't
you can't.
--
The Wanderer
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw
Attachment:
signature.asc
Description: OpenPGP digital signature