aquaticus / nexus433

433MHz temperature and humidity sensor receiver that integrates with home automation systems.
GNU General Public License v3.0
192 stars 32 forks source link

error: "libgpiod needs linux headers version >= v5.5.0" #21

Closed berechetflorin closed 3 years ago

berechetflorin commented 4 years ago

I have been trying a whole weekend to install libgpiod on Raspbian - RPi ZeroW but no matter I did, when I ran autogen.sh, this stopped with this error:

.
.
.
checking linux/version.h usability... yes
checking linux/version.h presence... yes
checking for linux/version.h... yes
configure: error: "libgpiod needs linux headers version >= v5.5.0"

I don't exactly know why this error(maybe it is related to this), i tried to install it on different Linux versions and machines but eventually I found another tutorial to install libgpiod (which worked): https://www.acmesystems.it/libgpiod

apt-get install -y libtool pkg-config autoconf-archive python3-dev
apt-get install -y build-essential
wget https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-1.1.1.tar.gz
tar xvf libgpiod-1.1.1.tar.gz
cd libgpiod-1.1.1

export PYTHON_VERSION=3
./autogen.sh --enable-tools=yes --enable-bindings-python --prefix=/usr/local

make
make install
ldconfig

I hope this will help someone, as it definitely helped me.

thorgrin commented 4 years ago

Also, from my recent notes:

Install libgpiod C library (version 1.4.2 seems fine for the 4.19 kernel on Raspbian buster)

git clone git://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
cd libgpiod
git checkout v1.4.2 -b v1.4.2
./autogen.sh --enable-tools=yes
make
sudo make install
datedave commented 3 years ago

Thanks for posting. Worked for me.

aquaticus commented 3 years ago

debian package for libgpiod is available. Manual compilation no longer needed.