linux/errno.h: No such file or directory (kernel compile error)

本文介绍了解决Linux环境下内核头文件路径配置问题的方法。通过使用符号链接(ln -s)命令将/usr/src/linux/include/asm 目录链接到 /usr/include/asm 以及将 /usr/src/linux/include/linux 目录链接到 /usr/include/linux,从而确保编译过程能够正确引用内核头文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

要解决这个问题,可以尝试link这两个命令
ln -s /usr/src/linux/include/asm /usr/include/asm
ln -s /usr/src/linux/include/linux /usr/include/linux
/usr/src/linux是你相应的kernel。

Initialising tasks...Sstate summary: Wanted 41 Local 0 Mirrors 0 Missed 41 Current 5509 (0% match, 99% complete) Removing 2 stale sstate objects for arch auto8678p1_64_hyp...done. NOTE: Executing Tasks NOTE: Running task 6119 of 10968 (/home/nebula/external_drive/yocto_78_2os/meta/poky/../meta-mediatek-mt8678/recipes-telephonyware/libuciwrapper/libuciwrapper_1.0.0.bb:do_package) NOTE: recipe libuciwrapper-1.0.0-r0: task do_package: Started ERROR: libuciwrapper-1.0.0-r0 do_package: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: <module> 0001: *** 0002:package_prepare_pkgdata(d) 0003: File: '/home/nebula/external_drive/yocto_78_2os/meta/poky/meta/classes-global/package_pkgdata.bbclass', lineno: 165, function: package_prepare_pkgdata 0161: dest = targetdir + l.replace(stagingdir, "") 0162: if l.endswith("/"): 0163: staging_copydir(l, targetdir, dest, seendirs) 0164: continue *** 0165: staging_copyfile(l, targetdir, dest, postinsts, seendirs) 0166: 0167: bb.note("Installed into pkgdata-sysroot: %s" % str(msg_adding)) 0168: 0169:} File: '/home/nebula/external_drive/yocto_78_2os/meta/poky/meta/classes-global/staging.bbclass', lineno: 165, function: staging_copyfile 0161: os.symlink(linkto, dest) 0162: #bb.warn(c) 0163: else: 0164: try: *** 0165: os.link(c, dest) 0166: except OSError as err: 0167: if err.errno == errno.EXDEV: 0168: bb.utils.copyfile(c, dest) 0169: else: Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/nebula/external_drive/yocto_78_2os/build-mix/tmp/pkgdata/auto8678p1_64_hyp/uci' -> '/home/nebula/external_drive/yocto_78_2os/build-mix/tmp/work/aarch64-poky-linux/libuciwrapper/1.0.0/pkgdata-sysroot/uci' ERROR: Logfile of failure stored in: /home/nebula/external_drive/yocto_78_2os/build-mix/tmp/work/aarch64-poky-linux/libuciwrapper/1.0.0/temp/log.do_package.36125 NOTE: recipe libuciwrapper-1.0.0-r0: task do_package: Failed ERROR: Task (/home/nebula/external_drive/yocto_78_2os/meta/poky/../meta-mediatek-mt8678/recipes-telephonyware/libuciwrapper/libuciwrapper_1.0.0.bb:do_package) failed with exit code '1' NOTE: Running task 7444 of 10968 (/home/nebula/external_drive/yocto_78_2os/meta/poky/../meta-mediatek-mt8678/recipes-kernel/vendor_modules/virt-grt-kernel.bb:do_package) NOTE: Running task 7470 of 10968 (/home/nebula/external_drive/yocto_78_2os/meta/poky/../meta-mediatek-mt8678/recipes-telephony/speech_daemon_service/speech-daemon-service_1.0.0.bb:do_package) NOTE: Running task 7471 of 10968 (/home/nebula/external_drive/yocto_78_2os/meta/poky/../meta-mediatek-mt8678/recipes-telephony/mtk_phonecall_ioplugin/mtk-phonecall-ioplugin.bb:do_package) WARNING: Recipe virt-grt-kernel sets S variable with trailing slash '/home/nebula/external_drive/yocto_78_2os/build-mix/tmp/work/auto8678p1_64_hyp-poky-linux/virt-grt-kernel/1.0/git/', remove it WARNING: Recipe virt-grt-kernel sets B variable with trailing slash '/home/nebula/external_drive/yocto_78_2os/build-mix/tmp/work/auto8678p1_64_hyp-poky-linux/virt-grt-kernel/1.0/git/', remove it
最新发布
07-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值