尝试编译代码时出现错误127 [英] Make Error 127 when running trying to compile code

查看:185
本文介绍了尝试编译代码时出现错误127的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本学期,我学习了这个新主题,可以与Discovery STM32 F4一起使用,但我们仍处于设置阶段.但是我一开始就有这个问题.

This semester I got this new subject where we get to work with Discovery STM32 F4, and we are still in the phase of setting it up. But I have this problem in the beginning.

当我尝试编译此闪烁"代码时,出现此错误:

When I try to compile this "blink" code I get this error:

因此,到目前为止,我们正在使用此快捷命令"make"来编译代码,并且得到了如下所示进行设置的指令:

So, as I got it so far, we are using this shortcut command "make" to compile code, and we were given instruction to set it up as it's shown in images below:

有人可以看到这里有什么问题吗?

Can anyone see what's the problem here?

推荐答案

Error 127表示以下两件事之一:

Error 127 means one of two things:

    找不到
  1. 文件:您使用的路径不正确.仔细检查程序是否确实在您的$PATH中,或者在这种情况下,相对路径正确-请记住,随机终端的当前工作目录可能与您所使用的IDE不同.最好改用绝对路径.
  2. 找不到
  3. ldso:您使用的是预编译的二进制文件,并且它需要系统中没有的解释器.也许您使用的是x86_64(64位)发行版,但预构建的版本适用于x86(32位).您可以通过打开终端并尝试直接执行它来确定这是否是答案.或通过在/bin/sh上运行file -L(以获取默认/本机格式)以及在编译器本身上运行(以查看其格式).
  1. file not found: the path you're using is incorrect. double check that the program is actually in your $PATH, or in this case, the relative path is correct -- remember that the current working directory for a random terminal might not be the same for the IDE you're using. it might be better to just use an absolute path instead.
  2. ldso is not found: you're using a pre-compiled binary and it wants an interpreter that isn't on your system. maybe you're using an x86_64 (64-bit) distro, but the prebuilt is for x86 (32-bit). you can determine whether this is the answer by opening a terminal and attempting to execute it directly. or by running file -L on /bin/sh (to get your default/native format) and on the compiler itself (to see what format it is).

如果问题是(2),则可以通过几种比较方法解决问题:

if the problem is (2), then you can solve it in a few diff ways:

  1. 获得更好的二进制文件.与为您提供工具链的供应商进行交流,并要求他们提供不会拖延的工具.
  2. 查看您的发行版是否可以安装文件的multilib集.大多数x86_64 64位发行版允许您并行安装x86 32位库.
  3. 使用类似 crosstool-ng 的工具构建自己的交叉编译器.
  4. 您可以在x86_64& x86安装,但这似乎有点过分;).
  1. get a better binary. talk to the vendor that gave you the toolchain and ask them for one that doesn't suck.
  2. see if your distro can install the multilib set of files. most x86_64 64-bit distros allow you to install x86 32-bit libraries in parallel.
  3. build your own cross-compiler using something like crosstool-ng.
  4. you could switch between an x86_64 & x86 install, but that seems a bit drastic ;).

这篇关于尝试编译代码时出现错误127的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆