GCC не может найти пакет libusb-dev

Пытаясь скомпилировать pymini, Eckler Software на RPI3, Помощник Ubuntu 16.04 я получаю следующий вывод./настраивать с ошибкой: настройте: ошибка: не может найти поддержку libusb-devel 1.0

tim@tim-desktop:~/pymini-1.16$ ./configure

    checking build system type... armv7l-unknown-linux-gnueabi
    checking host system type... armv7l-unknown-linux-gnueabi
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for g++... g++
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking for a BSD-compatible install... /usr/bin/install -c
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking minix/config.h usability... no
    checking minix/config.h presence... no
    checking for minix/config.h... no
    checking whether it is safe to define __EXTENSIONS__... yes
    checking "for canonical host"... "Linux/Unix"
    checking for mini build... yes
    checking for pow in -lm... yes
    checking pthread.h usability... yes
    checking pthread.h presence... yes
    checking for pthread.h... yes
    checking libusb.h usability... no
    checking libusb.h presence... no
    checking for libusb.h... no
    configure: error: cannot find libusb-devel 1.0

Я установил libusb-dev и работал, настраивают снова и настраивают отказавший снова с той же ошибкой, я установил libusb-1.0-0-dev и работал, настраивают снова и настраивают отказавший снова с той же ошибкой, я затем сделал некоторый поиск Гула и попробовал немного расследования на установке libusb со следующими командами

sudo dpkg -L libusb-1.0-0-dev

     /.
     /usr
     /usr/lib
     /usr/lib/arm-linux-gnueabihf
     /usr/lib/arm-linux-gnueabihf/pkgconfig
     /usr/lib/arm-linux-gnueabihf/pkgconfig/libusb-1.0.pc
     /usr/lib/arm-linux-gnueabihf/libusb-1.0.a
     /usr/include
     /usr/include/libusb-1.0
     /usr/include/libusb-1.0/libusb.h
     /usr/share
     /usr/share/doc
     /usr/share/doc/libusb-1.0-0-dev
     /usr/share/doc/libusb-1.0-0-dev/copyright
     /usr/lib/arm-linux-gnueabihf/libusb-1.0.so
     /usr/share/doc/libusb-1.0-0-dev/README
     /usr/share/doc/libusb-1.0-0-dev/changelog.Debian.gz

И также:

sudo dpkg -L libusb-dev

    /.
    /usr
    /usr/include
    /usr/include/usb.h
    /usr/bin
    /usr/bin/libusb-config
    /usr/share
    /usr/share/doc-base
    /usr/share/doc-base/libusb-dev
    /usr/share/man
    /usr/share/man/man1
    /usr/share/man/man1/libusb-config.1.gz
    /usr/share/doc
    /usr/share/doc/libusb-dev
    /usr/share/doc/libusb-dev/copyright
    /usr/share/doc/libusb-dev/html
    /usr/share/doc/libusb-dev/html/api-return-values.html
    /usr/share/doc/libusb-dev/html/ref.core.html
    /usr/share/doc/libusb-dev/html/api-synchronous.html
    /usr/share/doc/libusb-dev/html/intro-overview.html
    /usr/share/doc/libusb-dev/html/api-timeouts.html
    /usr/share/doc/libusb-dev/html/preface.html
    /usr/share/doc/libusb-dev/html/function.usbsetaltinterface.html
    /usr/share/doc/libusb-dev/html/ref.deviceops.html
    /usr/share/doc/libusb-dev/html/function.usbcontrolmsg.html
    /usr/share/doc/libusb-dev/html/api.html
    /usr/share/doc/libusb-dev/html/ref.control.html
    /usr/share/doc/libusb-dev/html/function.usbbulkwrite.html
    /usr/share/doc/libusb-dev/html/api-device-interfaces.html
    /usr/share/doc/libusb-dev/html/intro.html
    /usr/share/doc/libusb-dev/html/ref.bulk.html
    /usr/share/doc/libusb-dev/html/ref.interrupt.html
    /usr/share/doc/libusb-dev/html/examples.html
    /usr/share/doc/libusb-dev/html/function.usbclaiminterface.html
    /usr/share/doc/libusb-dev/html/function.usbclose.html
    /usr/share/doc/libusb-dev/html/examples-other.html
    /usr/share/doc/libusb-dev/html/function.usbresetep.html
    /usr/share/doc/libusb-dev/html/api-types.html
    /usr/share/doc/libusb-dev/html/function.usbfinddevices.html
    /usr/share/doc/libusb-dev/html/function.usbdetachkerneldrivernp.html
    /usr/share/doc/libusb-dev/html/function.usbgetdescriptor.html       
    /usr/share/doc/libusb-dev/html/intro-support.html
    /usr/share/doc/libusb-dev/htm/function.usbgetdescriptorbyendpoint.html
    /usr/share/doc/libusb-dev/html/function.usbclearhalt.html
    /usr/share/doc/libusb-dev/html/function.usbgetdrivernp.html
    /usr/share/doc/libusb-dev/html/index.html
    /usr/share/doc/libusb-dev/html/function.usbopen.html
    /usr/share/doc/libusb-dev/html/function.usbinterruptread.html
    /usr/share/doc/libusb-dev/html/ref.nonportable.html
    /usr/share/doc/libusb-dev/html/functions.html
    /usr/share/doc/libusb-dev/html/function.usbfindbusses.html
    /usr/share/doc/libusb-dev/html/function.usbinterruptwrite.html
    /usr/share/doc/libusb-dev/html/examples-tests.html
    /usr/share/doc/libusb-dev/html/function.usbgetstring.html
    /usr/share/doc/libusb-dev/html/function.usbbulkread.html
    /usr/share/doc/libusb-dev/html/function.usbgetstringsimple.html
    /usr/share/doc/libusb-dev/html/examples-code.html
    /usr/share/doc/libusb-dev/html/function.usbreleaseinterface.html
    /usr/share/doc/libusb-dev/html/function.usbgetbusses.html
    /usr/share/doc/libusb-dev/html/function.usbsetconfiguration.html
    /usr/share/doc/libusb-dev/html/function.usbreset.html
    /usr/share/doc/libusb-dev/html/function.usbinit.html
    /usr/lib
    /usr/lib/arm-linux-gnueabihf
    /usr/lib/arm-linux-gnueabihf/pkgconfig
    /usr/lib/arm-linux-gnueabihf/pkgconfig/libusb.pc
    /usr/lib/arm-linux-gnueabihf/libusb.so
    /usr/lib/arm-linux-gnueabihf/libusb.a
    /usr/share/doc/libusb-dev/changelog.Debian.gz

затем я попробовал:

pkg-config --cflags --libs /usr/lib/arm-linux-gnueabihf/pkgconfig/libusb-1.0.pc

затем повторно выполненный настраивают, и это перестало работать с той же ошибкой, таким образом, я также попробовал:

pkg-config --cflags --libs /usr/lib/arm-linux-gnueabihf/pkgconfig/libusb.pc

затем повторно выполненный настраивают, и это перестало работать с той же ошибкой, которую я также выполнил:

`pkg-config --modversion libusb-1.0
    1.0.20
 pkg-config --modversion libusb
    0.1.12 

Я затем удалил отъезд libusb-dev только libusb-1.0-0-dev установленный. Затем испытанное выполнение настраивает снова с той же ошибкой

    configure: error: cannot find libusb-devel 1.0

Затем я пытался добавить к ~ .bashrc

PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib/arm-linux-gnueabihf/pkgconfig/libusb-1.0.pc

То, что продолжается здесь, не может понять, что это ценило бы некоторую справку

tjmarch

1
задан 9 April 2017 в 21:39

2 ответа

По некоторой странной причине этот "pymini" пакет не пытается обнаружить путь или другие флаги к самому libusb правильно. Необходимо дать ему некоторые дополнительные флаги для этого, которое Вы видите ссылаемый в комментариях для configure.ac

# Notes on compiling on Ubuntu.
#
#     ./configure --prefix=/usr CFLAGS="-g -Wall -I/usr/include/libusb-1.0" CXXFLAGS="-g -Wall -I/usr/include/libusb-1.0" (Ubuntu 12.04)
#
#     make
#     make install

, который Вы на правильном пути. libusb-1.0-0-dev является пакетом, в котором Вы нуждаетесь (и не libusb-dev, который отличается), в которой точке выше должны просто работать команды от configure.ac, как.

А "более хорошая" версия с помощью pkg-конфигурации, которую Вы пробовали, будет чем-то вроде этого.

pkg-config libusb-1.0 --cflags
./configure --prefix=/usr CFLAGS="$(pkg-config libusb-1.0 --cflags)" CXXFLAGS="$(pkg-config libusb-1.0 --cflags)" 

Обычно Вы также установили бы $ LIBS= (pkg-сконфигурируйтесь, libusb-1.0 - освобождает), однако, который уже трудно кодируется в этот проект, таким образом, это не нужно в этом конкретном случае.

0
ответ дан 8 December 2019 в 05:52

попытка: pkg-config --modversion libusb-dev

я не думаю, что pkg-config-path является командой. Существует переменная среды PKG_CONFIG_PATH.

0
ответ дан 8 December 2019 в 05:52

Другие вопросы по тегам:

Похожие вопросы: