How to build and install Bluez

Bluez is the default Bluetooth protocol stack on Linux. It should be present and installed on your Linux distribution. If not, building and installing from source is not too difficult:

  • Download the latest stable source release of Bluez from here. Unzip the compressed file you downloaded.

  • Install the headers and libraries required for Bluez compilation:

$ sudo apt install libdbus-1-dev libudev-dev libical-dev libreadline-dev

If you do not install the libdbus-1-dev, you will later get this strange error:

configure: error: D-Bus >= 1.6 is required
  • Next configure the Makefile:
$ ./configure

This gave an error about systemd, which is not present on the relatively old Ubuntu I was on:

checking systemd system unit dir... configure: error: systemd system unit directory is required

So, I ran configure disabling systemd:

$ ./configure --disable-systemd
  • After that build and install as usual:
$ make
$ sudo make install

Tried with: Bluez 5.45 and Ubuntu 14.04

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s