开发环境: Debian 9.3
1. 下载
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.49.tar.xz
最新版本看 http://www.bluez.org/download/ 或 http://www.kernel.org/pub/linux/bluetooth/
2. 解压
tar xf bluez-5.49.tar.xz
3. 编译
3.1 步骤
# sudo apt-get install libglib2.0-dev libudev-dev libsbc-dev libreadline-dev libical-dev libelf-dev elfutils libdw-dev libjson-c-dev libalsa-ocaml-dev libspeexdsp-dev
# cd bluez-5.49
# ./bootstrap-configure # 相当于 ./ configure, 估计 bluez 不用 autoconf 工具维护
# make
3.2 处理错误
Error: checking for GLIB... no
configure: error: GLib >= 2.28 is required
Solve: sudo apt-get install libglib2.0-dev # 这里估计是大版本后,反正安装后没有报版本过低的错误
------------------------------------------------------------
Error:checking for UDEV... no
configure: error: libudev >= 143 is required
Solve: sudo apt-get install libudev-dev
------------------------------------------------------------
Error:configure: error: SBC library >= 1.2 is required
Solve:sudo apt-get install libsbc-dev
------------------------------------------------------------
Error: checking for readline/readline.h... no
configure: error: readline header files are required
Solve: sudo apt-get install libreadline-dev
------------------------------------------------------------
Error:checking elfutils/libdwfl.h usability... no
checking elfutils/libdwfl.h presence... no
checking for elfutils/libdwfl.h... no
configure: error: elfutils support is required
Solve: sudo apt-get install libelf-dev elfutils libdw-dev
最后安装完 libdw-dev 解决问题,libelf-dev elfutils不确定,我就不测试了,你可以不安装试试。
------------------------------------------------------------
Error: checking for JSONC... no
configure: error: json-c is required
Solve: sudo apt-get install libjson-c-dev
------------------------------------------------------------
Error : checking for ICAL... no
configure: error: libical is required
Solve: sudo apt-get install libical-dev
------------------------------------------------------------
Error:checking for ALSA... no
configure: error: ALSA lib is required for MIDI support
Solve:sudo apt-get install libalsa-ocaml-dev
------------------------------------------------------------
Error:checking for DBUS... no
configure: error: D-Bus >= 1.6 is required
Solve : sudo apt-get install libdbus-1-dev # or libdbus-c++-dev
------------------------------------------------------------
Error:configure: error: SPEEXDSP library >= 1.2 is required
Solve:sudo apt-get install libspeexdsp-dev
------------------------------------------------------------
总之:sudo apt-get install libical-dev libglib2.0-dev libreadline-dev libdbus-1-dev libudev-dev libsbc-dev libelf-dev elfutils libdw-dev libjson-c-dev libalsa-ocaml-dev libspeexdsp-dev

1517

被折叠的 条评论
为什么被折叠?



