2016-06-10 125 views
0

我想编译一个c代码并使用yocto进行安装。它使用do_compile成功编译。错误:无法派生fakeroot工作人员运行/PATH_TO_THIS/example_0.1.bb:do_install:[Errno 2]没有这样的文件或目录

我试图用do_install来安装,它给出了波纹管错误。

ERROR: Failed to spawn fakeroot worker to run /PATH_TO_THIS/example_0.1.bb:do_install: [Errno 2] No such file or directory

请在下面找到

SUMMARY = "Simple helloworld application" 
SECTION = "examples" 
LICENSE = "MIT" 
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR} /MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" 

SRC_URI = "file://sample.c" 

S = "${WORKDIR}" 

do_compile() { 
    x86_64-linux-gnu-gcc sample.c -o test_example 
} 

do_install() { 
    install -d ${D}${bindir} 
    install -m 0755 test_example ${D}${bindir} 
} 
+0

你究竟如何运行它?你偶然使用bitbake的-b选项? – bluelightning

+0

Hi bluelightning,是bitbake -b /*path*/example_0.1.bb – anikhan

回答

0

基于上面所使用-b您的评论我的BB文件 - 这是几乎可以肯定这个问题的原因。当您使用-b bitbake将打印此警告:

WARNING: Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b/--buildfile.

您可能会丢失的依赖项之一是fakeroot程序(伪)。使用-b可能会阻止构建它。

而不是使用-b,你应该把配方放在一个位置bitbake可以找到它(测试,可能是meta/recipes-extended/example,但是当你做得正确时,你应该创建自己的图层并把它在那里)。那么你可以像其他任何食谱一样构建它:

bitbake example 
相关问题