Доброго времени суток. Прошу помощи в установке библиотеки libusb-0.1-4
По этой инструкции пользователи Линукс меняют мак-адрес джойстика:
Подсоединяем джой к компу кабелем.
1. sudo apt-get install libusb-dev libusb-0.1-4
2. wget http://www.pabr.org/sixlinux/sixpair.c
3. gcc -o sixpair sixpair.c -lusb
4. Смотрим блютус адрес у себя на планшете/телефоне в программе Sixasis Controller
5. sudo ./sixpair "XX:XX:XX:XX:XX:XX" - вместо Х ставите значения своего блютус адреса.
6. Отсоединяете контроллер и дальше как обычно с Sixasis Controller
Пытался через Установка программ найти и установить libusb, но там другие версии и даже они не помогли, вылазит ошибка:
оттуда скачал libusb-compat-0.1.4
проделал следующее:
den@mac-mini-rosa ~ $ su -
Пароль:
mac-mini-rosa ~ # cd libusb-compat-0.1.4
mac-mini-rosa libusb-compat-0.1.4 # ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
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 style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -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 for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for inline... inline
checking whether gcc and cc understand -c and -o together... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBUSB_1_0... no
configure: error: Package requirements (libusb-1.0 >= 0.9.1) were not met:
No package 'libusb-1.0' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBUSB_1_0_CFLAGS
and LIBUSB_1_0_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Как видите, ругается на отсутствие libusb-1.0...
Тогда я скачал на этой же странице libusb-1.0.9
и сделал следующее:
mac-mini-rosa den # cd libusb-1.0.9
mac-mini-rosa libusb-1.0.9 # ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
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 style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -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 for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for windres... no
checking for inline... inline
checking whether gcc and cc understand -c and -o together... yes
checking operating system... Linux
checking for clock_gettime in -lrt... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking sys/timerfd.h usability... yes
checking sys/timerfd.h presence... yes
checking for sys/timerfd.h... yes
checking whether TFD_NONBLOCK is declared... yes
checking whether to use timerfd for timing... yes
checking for struct timespec... yes
checking for sigaction... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for gettimeofday... yes
configure: creating ./config.status
config.status: creating libusb-1.0.pc
config.status: creating Makefile
config.status: creating libusb/Makefile
config.status: creating examples/Makefile
config.status: creating doc/Makefile
config.status: creating doc/doxygen.cfg
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
mac-mini-rosa libusb-1.0.9 # make
make all-recursive
make[1]: вход в каталог «/home/den/libusb-1.0.9»
Making all in libusb
make[2]: вход в каталог «/home/den/libusb-1.0.9/libusb»
CC libusb_1_0_la-core.lo
CC libusb_1_0_la-descriptor.lo
CC libusb_1_0_la-io.lo
CC libusb_1_0_la-sync.lo
CC libusb_1_0_la-linux_usbfs.lo
CC libusb_1_0_la-threads_posix.lo
CCLD libusb-1.0.la
make[2]: выход из каталога «/home/den/libusb-1.0.9/libusb»
Making all in doc
make[2]: вход в каталог «/home/den/libusb-1.0.9/doc»
make[2]: Цель «all» не требует выполнения команд.
make[2]: выход из каталога «/home/den/libusb-1.0.9/doc»
make[2]: вход в каталог «/home/den/libusb-1.0.9»
make[2]: выход из каталога «/home/den/libusb-1.0.9»
make[1]: выход из каталога «/home/den/libusb-1.0.9»
mac-mini-rosa libusb-1.0.9 # make install
Making install in libusb
make[1]: вход в каталог «/home/den/libusb-1.0.9/libusb»
make[2]: вход в каталог «/home/den/libusb-1.0.9/libusb»
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/sh ../libtool --mode=install /usr/bin/install -c libusb-1.0.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libusb-1.0.so.0.1.0 /usr/local/lib/libusb-1.0.so.0.1.0
libtool: install: (cd /usr/local/lib && { ln -s -f libusb-1.0.so.0.1.0 libusb-1.0.so.0 || { rm -f libusb-1.0.so.0 && ln -s libusb-1.0.so.0.1.0 libusb-1.0.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libusb-1.0.so.0.1.0 libusb-1.0.so || { rm -f libusb-1.0.so && ln -s libusb-1.0.so.0.1.0 libusb-1.0.so; }; })
libtool: install: /usr/bin/install -c .libs/libusb-1.0.lai /usr/local/lib/libusb-1.0.la
libtool: install: /usr/bin/install -c .libs/libusb-1.0.a /usr/local/lib/libusb-1.0.a
libtool: install: chmod 644 /usr/local/lib/libusb-1.0.a
libtool: install: ranlib /usr/local/lib/libusb-1.0.a
libtool: finish: PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/include/libusb-1.0" || /bin/mkdir -p "/usr/local/include/libusb-1.0"
/usr/bin/install -c -m 644 libusb.h '/usr/local/include/libusb-1.0'
make[2]: выход из каталога «/home/den/libusb-1.0.9/libusb»
make[1]: выход из каталога «/home/den/libusb-1.0.9/libusb»
Making install in doc
make[1]: вход в каталог «/home/den/libusb-1.0.9/doc»
make[2]: вход в каталог «/home/den/libusb-1.0.9/doc»
make[2]: Цель «install-exec-am» не требует выполнения команд.
make[2]: Цель «install-data-am» не требует выполнения команд.
make[2]: выход из каталога «/home/den/libusb-1.0.9/doc»
make[1]: выход из каталога «/home/den/libusb-1.0.9/doc»
make[1]: вход в каталог «/home/den/libusb-1.0.9»
make[2]: вход в каталог «/home/den/libusb-1.0.9»
make[2]: Цель «install-exec-am» не требует выполнения команд.
test -z "/usr/local/lib/pkgconfig" || /bin/mkdir -p "/usr/local/lib/pkgconfig"
/usr/bin/install -c -m 644 libusb-1.0.pc '/usr/local/lib/pkgconfig'
make[2]: выход из каталога «/home/den/libusb-1.0.9»
make[1]: выход из каталога «/home/den/libusb-1.0.9»
Однако когда я попробовал снова поставить libusb-compat-0.1.4, то опять получил как и в первый раз: