linux - 使用工具链时出现 execv 错误

标签 linux gcc cross-compiling

当我尝试编译一个小的 helloworld c 文件时出现此错误:

/opt/crosstool/arm-none-linux-gnueabi-4.4.0_ARMv5TE/bin/arm-none-linux-gnueabi-gcc -DARCH_ARM -o hello.c.o -c hello.c
arm-none-linux-gnueabi-gcc: error trying to exec '/opt/crosstool/arm-none-linux-gnueabi-4.4.0_ARMv5TE/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.0/../../../../arm-none-linux-gnueabi/bin/as': execv: No such file or directory

我正在运行 ubuntu 14.04 lts ... 我看到我有 exec 命令,但我的 ubuntu 上没有 execv。什么是 execv?

谢谢

最佳答案

问题是由于我的 Ubuntu 14.04 64 位缺少 32 位库造成的。

为了解决这个问题,我必须安装:

sudo dpkg --add-architecture i386

sudo apt-get 更新

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6

关于linux - 使用工具链时出现 execv 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29417476/

相关文章:

linux - 内存时间替代品

linux - 在 QProcess 输出中保留 ANSI 转义序列

c++ - 如何让我的系统支持纳秒精度

c++ - 复制构造函数与 pch 中的 const 成员函数冲突?海湾合作委员会的错误?

c - 警告 : data definition has no type or storage class

linux-kernel - 如何为 Linux Kernel Arm 交叉编译设置机器类型 (arch_id)

c++ - 对汇编函数的 undefined reference

ios - CMake find_package 在为 iOS 构建时忽略 PATHS 选项

Linux mint 增加游标大小超过默认最大值

debugging - _DEBUG 何时何地定义?