configure: error: linux/gpio.h header not found (needed to build the library)

编译gpiod文件时,遇到如下困难:

checking for linux/gpio.h... no
configure: error: linux/gpio.h header not found (needed to build the library)

有没有曾经遇到,解决过得,

gpiod下载有两个地址:

1) 官网

2) linux网站

3) kernel网站
 
 
解决方法:
创建响应的连接
sudo ln -s /usr/src/linux-headers-4.15.0-36-generic/include/asm-generic /usr/include/asm
sudo ln -s /usr/src/linux-headers-4.15.0-36-generic/include/linux /usr/include/linux

根本解决方法:
使用v1.3版本,其他版本要求内核版本>5.5.然后在tx2板子上进行编译.
根本原因是交叉编译导致.在台式机上解决了以上问题后,还会有/uebi/linux/error.h找不到等许多问题.
原文地址:https://www.cnblogs.com/rohens-hbg/p/15014054.html