I'm trying to create a Docker container that uses Bluez. After downloading and unpacking the version that I need i use
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
in the directory before the make command. But every time I try to build my container using the file i get this error
checking udev directory... Package udev was not found in the pkg-config search path.
Perhaps you should add the directory containing `udev.pc'
to the PKG_CONFIG_PATH environment variable
No package 'udev' found
configure: error: udev directory is required
I'm not sure what I am doing wrong or what I can do to fix this.
The Dockerfile in question:
FROM ubuntu:18.04
USER root
WORKDIR /home/docker
COPY . /home/docker
ENV TZ=Europe/Vienna
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-ard64/
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt update && \
apt upgrade && \
apt install -y wget && \
apt install -y git && \
apt install -y cmake && \
apt install -y openjdk-8-jdk && \
apt install -y maven && \
apt install -y libglib2.0-dev libdbus-1-dev libudev-dev libical-dev libreadline-dev && \
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.47.tar.xz && \
tar -xf bluez-5.47.tar.xz && \
cd bluez-5.47 && \
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
make && \
make install
This problem is related to missing libudev static libraires.
Add these flags to configure:
--disable-systemd --with-udevdir=/lib/udev