gpt4 book ai didi

linux - 如何解决此错误——在编译 socketcan 实用程序时

转载 作者:太空狗 更新时间:2023-10-29 11:04:48 24 4
gpt4 key购买 nike

我已经从 SVN 下载了实用程序。因为默认情况下 can utitlities 不在内核中。

svn checkout svn://svn.berlios.de/socketcan/trunk/can-utils

我使用的内核是:--

ignite@ignite:~/socketcan/can-utils$ uname -a
Linux ignite 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:32:08 UTC 2012 i686 i686 i686 GNU/Linux

然后我重新编译了实用程序。这是找不到 isotp.h 的错误:---

ignite@ignite:~/socketcan/can-utils$ make all
cc -O2 -Wall -Wno-parentheses -I../kernel/2.6/include -fno-strict-aliasing -DSO_RXQ_OVFL=40 -DPF_CAN=29 -DAF_CAN=PF_CAN isotprecv.c -o isotprecv
isotprecv.c:60:29: fatal error: linux/can/isotp.h: No such file or directory
compilation terminated.
make: *** [isotprecv] Error 1
cc -O2 -Wall -Wno-parentheses -I../kernel/2.6/include -fno-strict-aliasing -DSO_RXQ_OVFL=40 -DPF_CAN=29 -DAF_CAN=PF_CAN isotpsend.c -o isotpsend
isotpsend.c:60:29: fatal error: linux/can/isotp.h: No such file or directory
compilation terminated.
make: *** [isotpsend] Error 1
cc -O2 -Wall -Wno-parentheses -I../kernel/2.6/include -fno-strict-aliasing -DSO_RXQ_OVFL=40 -DPF_CAN=29 -DAF_CAN=PF_CAN isotpsniffer.c -o isotpsniffer
isotpsniffer.c:61:29: fatal error: linux/can/isotp.h: No such file or directory
compilation terminated.
make: *** [isotpsniffer] Error 1
cc -O2 -Wall -Wno-parentheses -I../kernel/2.6/include -fno-strict-aliasing -DSO_RXQ_OVFL=40 -DPF_CAN=29 -DAF_CAN=PF_CAN isotptun.c -o isotptun
isotptun.c:69:29: fatal error: linux/can/isotp.h: No such file or directory
compilation terminated.
make: *** [isotptun] Error 1
cc -O2 -Wall -Wno-parentheses -I../kernel/2.6/include -fno-strict-aliasing -DSO_RXQ_OVFL=40 -DPF_CAN=29 -DAF_CAN=PF_CAN isotpserver.c -o isotpserver
isotpserver.c:80:29: fatal error: linux/can/isotp.h: No such file or directory
compilation terminated.
make: *** [isotpserver] Error 1
make: Target `all' not remade because of errors.

最佳答案

克隆最新的 can-utils存储库:

git clone https://github.com/linux-can/can-utils.git
cd can-utils
./autogen.sh
./configure
make
make install

关于linux - 如何解决此错误——在编译 socketcan 实用程序时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19204862/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com