0

在 ubuntu 11.10 上编译 Android 时出现以下错误

target arm C: libc <= bionic/libc/bionic/pthread.c
arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libc_intermediates/bionic/pthread.o] Error 1

有什么线索吗?

4

3 回答 3

1

它找不到cc1。在我全新安装的 Ubuntu 11.10 中,它已安装但不在我的路径中。尝试手动将其添加到您的路径中。

export PATH=<pathtoitgoeshere>:$PATH

在我的 Ubuntu 上,它位于

/usr/lib/gcc/i686-linux-gnu/4.6.1/cc1

但是您可以使用

gcc -print-prog-name=cc1
于 2012-04-18T10:25:05.677 回答
0

我花了大约一天的时间来找到这个的根本原因:arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file...以及其他问题。问题是我用 7z 解压了 NDK 和 SDK,这删除了所有二进制文件的可执行权限,并且 Eclipse 无法启动 cc1。一旦我使用 tar 解压了 SDK 和 NDK 的 tar 文件,一切都开始运行良好。

PS。我希望对其他人来说,这一天是安全的。

于 2014-07-29T09:51:28.430 回答
0

我从 Ubuntu 12.04 => 14.04 升级后遇到了这个问题。

Seems like the build-essential package wasn't upgraded properly. For me, I was able to fix by doing

sudo apt-get purge gcc
sudo apt-get install gcc
于 2015-02-24T04:34:46.827 回答