[英]YOCTO: "error: cannot run ssh: No such file or directory"
I'm making a recipe in yocto raspberry.我正在用 yocto 覆盆子做一个食谱。 I want to get some files from a server with git.我想用 git 从服务器获取一些文件。 This is my recipe:这是我的食谱:
DESCRIPTION = "test"
SECTION = "abc"
LICENSE = "CLOSED"
PR = "r0"
SRC_URI =
"git://gerrit.g1.abc.corp:29418/cardlog;protocol=ssh;rev=master"
"
PACKAGE_ARCH = "${MACHINE_ARCH}"
S = "${WORKDIR}/git"
inherit pkgconfig cmake
do_install() {
install -d ${D}${base_bindir}
install -m 0755 cardlog ${D}${base_bindir}
}
I'm getting this error message when I run bitbake:运行 bitbake 时收到此错误消息:
ERROR: abc-cardlog-1.0-r0 do_fetch:
Fetcher failure:
Fetch command export DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-j365B7zbUr,guid=20e178f2b82d0bb8e57068dc59e83e63";
export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export no_proxy="localhost,127.0.0.0/8,::1";
export NO_PROXY="localhost,127.0.0.0/8,::1";
export PATH="/home/abc-int/Desktop/yocto_r/build-rpi/tmp/sysroots-uninative/x86_64-linux/usr/bin:
/home/abc-int/Desktop/yocto_r/poky/scripts:
/home/abc-int/Desktop/yocto_r/build-rpi/tmp/work/raspberrypi-poky-linux-gnueabi/abc-cardlog/1.0-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi:
/home/abc-int/Desktop/yocto_r/build-rpi/tmp/work/raspberrypi-poky-linux-gnueabi/abc-cardlog/1.0-r0/recipe-sysroot/usr/bin/crossscripts:
/home/abc-int/Desktop/yocto_r/build-rpi/tmp/work/raspberrypi-poky-linux-gnueabi/abc-cardlog/1.0-r0/recipe-sysroot-native/usr/sbin:
/home/abc-int/Desktop/yocto_r/build-rpi/tmp/work/raspberrypi-poky-linux-gnueabi/abc-cardlog/1.0-r0/recipe-sysroot-native/usr/bin:
/home/abc-int/Desktop/yocto_r/build-rpi/tmp/work/raspberrypi-poky-linux-gnueabi/abc-cardlog/1.0-r0/recipe-sysroot-native/sbin:
/home/abc-int/Desktop/yocto_r/build-rpi/tmp/work/raspberrypi-poky-linux-gnueabi/abc-cardlog/1.0-r0/recipe-sysroot-native/bin:
/home/abc-int/Desktop/yocto_r/poky/bitbake/bin:/home/abc-int/Desktop/yocto_r/build-rpi/tmp/hosttools";
export HOME="/home/abc-int"; git -c core.fsyncobjectfiles=0 ls-remote ssh://gerrit.g1.abc.corp:29418/cardlog failed with exit code 128, output:
error: cannot run ssh: No such file or directory
fatal: unable to fork
ERROR: abc-cardlog-1.0-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/abc-int/Desktop/yocto_r/build-rpi/tmp/work/raspberrypi-poky-linux-gnueabi/abc-cardlog/1.0-r0/temp/log.do_fetch.16941
ERROR: Task (/home/abc-int/Desktop/yocto_r/build-rpi/../poky/meta-abc/recipes-abc-cardlog/abc-cardlog/abc-cardlog.bb:do_fetch) failed with exit code '1'
I'm already running with success this recipe on another yocto project.我已经在另一个 yocto 项目上成功运行了这个食谱。 I have no problem there, my files are downloaded this success from git.我没有问题,我的文件是从 git 成功下载的。
I've moved my work on a rasbberrypi board.我已经将我的工作转移到了 rasbberrypi 板上。 So I created a new yocto project with a raspberry layer.所以我创建了一个带有树莓层的新 yocto 项目。 I've added my own layer.我已经添加了我自己的层。 I tried just to copy some files, with this recipe and everything is working fine.我试着用这个食谱复制一些文件,一切正常。
Any suggestions, please?请问有什么建议吗?
I assume you're using rocko.我假设您使用的是rocko。 What will likely solve your problem is merging the latest upstream version of the rocko branch into your poky directory, for example by doing a git pull
.可能会解决您的问题的是将 Rocko 分支的最新上游版本合并到您的 poky 目录中,例如通过执行git pull
。
I was dealing with the same problem today and the reason bitbake couldn't find ssh is that since rocko, the OpenEmbedded developers decided to sanitize the build environment by replacing PATH with a directory containing symlinks to "approved" native binaries.我今天正在处理同样的问题,bitbake 找不到 ssh 的原因是,自从 Rocko 以来,OpenEmbedded 开发人员决定通过将 PATH 替换为包含“已批准”本机二进制文件的符号链接的目录来清理构建环境。 This list of approved binaries is determined by the HOSTTOOLS variable which is defined in meta/conf/bitbake.conf.这个批准的二进制文件列表由在 meta/conf/bitbake.conf 中定义的 HOSTTOOLS 变量确定。 Someone accidentally caused ssh to be removed from that list, which has since been fixed.有人不小心导致 ssh 从该列表中删除,此后已修复。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.