我正在尝试构建一个使用 libusb 的程序,但出现很多错误,例如
i2cbrdg.c:84: error: implicit declaration of function ‘usb_init’
i2cbrdg.c:88: error: implicit declaration of function ‘usb_find_busses’
i2cbrdg.c:89: error: implicit declaration of function ‘usb_find_devices’
i2cbrdg.c:90: error: implicit declaration of function ‘usb_get_busses’
所以我正在尝试安装 libusb,但在安装时遇到了麻烦。我已经安装了 libusb-dev ,这似乎没问题。当我执行 dpkg -L libusb-dev 时,我得到一个目录列表。但是,当我 dpkg -L libusb 时,我得到
Package `libusb' is not installed.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
我已经完成了 sudo apt-get install libusb-1.0 并且一切正常。当我再次尝试这样做时,我收到了消息
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libusb-1.0-0' for regex 'libusb-1.0'
Note, selecting 'libusb-1.0-0-dev' for regex 'libusb-1.0'
libusb-1.0-0-dev is already the newest version.
libusb-1.0-0 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
我也试过用yum安装它,它仍然说它没有安装。我已经下载了该软件包的 tar 并在其上运行了 make,这似乎也没问题(没有明确的错误消息)。我真的不知道下一步该尝试什么。dpkg 消息一直告诉我它没有安装。谁能给我一个进去的方向?任何帮助表示赞赏。