arm-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory

解决Android编译权限错误

编android源码的时候总是会报下面的错误~~最后发现是交叉编译工具的权限问题,chmod -R 777 * 就可以了

arm-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory

总结一下:

1、确认cc1是存在的

2、确认交叉编译工具的权限

bell@bell-virtual-machine:~/nm/openwrt-15.05.1$ make V=s -j4 make[1]: Entering directory '/home/bell/nm/openwrt-15.05.1' make[2]: Entering directory '/home/bell/nm/openwrt-15.05.1' make[2]: Entering directory '/home/bell/nm/openwrt-15.05.1' + mkdir -p /home/bell/nm/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi + mkdir -p /home/bell/nm/openwrt-15.05.1/staging_dir/host + cd /home/bell/nm/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi + mkdir -p bin lib include stamp + cd /home/bell/nm/openwrt-15.05.1/staging_dir/host + mkdir -p bin lib include stamp mkdir -p /home/bell/nm/openwrt-15.05.1/build_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp mkdir -p /home/bell/nm/openwrt-15.05.1/build_dir/host/stamp /home/bell/nm/openwrt-15.05.1/staging_dir/host/include/sys touch /home/bell/nm/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/.prepared install -m0644 /home/bell/nm/openwrt-15.05.1/tools/include/*.h /home/bell/nm/openwrt-15.05.1/staging_dir/host/include/ install -m0644 /home/bell/nm/openwrt-15.05.1/tools/include/sys/*.h /home/bell/nm/openwrt-15.05.1/staging_dir/host/include/sys/ ln -sf lib /home/bell/nm/openwrt-15.05.1/staging_dir/host/lib64 touch /home/bell/nm/openwrt-15.05.1/staging_dir/host/.prepared make[3]: Entering directory '/home/bell/nm/openwrt-15.05.1/tools/patch' make[3]: Entering directory '/home/bell/nm/openwrt-15.05.1/tools/make-ext4fs' make[3]: Entering directory '/home/bell/nm/openwrt-15.05.1/tools/sstrip' rm -rf /home/bell/nm/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/root-realview make[2]: Leaving directory '/home/bell/nm/openwrt-15.05.1' make[3]: Entering directory '/home/bell/nm/openwrt-15.05.1/tools/firmware-utils' gcc -O2 -I/home/bell/nm/openwrt-15.05.1/staging_dir/host/include -I/home/bell/nm/openwrt-15.05.1/staging_dir/host/usr/include -include endian.h -o /home/bell/nm/openwrt-15.05.1/build_dir/host/sstrip/sstrip src/sstrip.c gcc: error trying to exec 'cc1': execvp: No such file or directory Makefile:25: recipe for target '/home/bell/nm/openwrt-15.05.1/build_dir/host/sstrip/.built' failed make[3]: *** [/home/bell/nm/openwrt-15.05.1/build_dir/host/sstrip/.built] Error 1 make[3]: Leaving directory '/home/bell/nm/openwrt-15.05.1/tools/sstrip' tools/Makefile:122: recipe for target 'tools/sstrip/compile' failed make[2]: *** [tools/sstrip/compile] Error 2 make[2]: *** Waiting for unfinished jobs.... (cd /home/bell/nm/openwrt-15.05.1/build_dir/host/patch-2.7.5/; if [ -x configure ]; then cp -fpR /home/bell/nm/openwrt-15.05.1/scripts/config.{guess,sub} /home/bell/nm/openwrt-15.05.1/build_dir/host/patch-2.7.5// && bash ./configure CC="gcc" CFLAGS="-O2 -I/home/bell/nm/openwrt-15.05.1/staging_dir/host/include -I/home/bell/nm/openwrt-15.05.1/staging_dir/host/usr/include" CPPFLAGS="-I/home/bell/nm/openwrt-15.05.1/staging_dir/host/include -I/home/bell/nm/openwrt-15.05.1/staging_dir/host/usr/include" LDFLAGS="-L/home/bell/nm/openwrt-15.05.1/staging_dir/host/lib -L/home/bell/nm/openwrt-15.05.1/staging_dir/host/usr/lib" SHELL="/usr/bin/env bash" --target=x86_64-linux-gnu --host=x86_64-linux-gnu --build=x86_64-linux-gnu --program-prefix="" --program-suffix="" --prefix=/home/bell/nm/openwrt-15.05.1/staging_dir/host --exec-prefix=/home/bell/nm/openwrt-15.05.1/staging_dir/host --sysconfdir=/home/bell/nm/openwrt-15.05.1/staging_dir/host/etc --localstatedir=/home/bell/nm/openwrt-15.05.1/staging_dir/host/var --sbindir=/home/bell/nm/openwrt-15.05.1/staging_dir/host/bin ; fi ) make[3]: Leaving directory '/home/bell/nm/openwrt-15.05.1/tools/make-ext4fs' mkdir -p /home/bell/nm/openwrt-15.05.1/build_dir/host/firmware-utils/bin gcc -O2 -I/home/bell/nm/openwrt-15.05.1/staging_dir/host/include -I/home/bell/nm/openwrt-15.05.1/staging_dir/host/usr/include -include endian.h -L/home/bell/nm/openwrt-15.05.1/staging_dir/host/lib -L/home/bell/nm/openwrt-15.05.1/staging_dir/host/usr/lib -o /home/bell/nm/openwrt-15.05.1/build_dir/host/firmware-utils/bin/addpattern src/addpattern.c gcc: error trying to exec 'cc1': execvp: No such file or directory Makefile:82: recipe for target '/home/bell/nm/openwrt-15.05.1/build_dir/host/firmware-utils/.built' failed make[3]: *** [/home/bell/nm/openwrt-15.05.1/build_dir/host/firmware-utils/.built] Error 1 make[3]: Leaving directory '/home/bell/nm/openwrt-15.05.1/tools/firmware-utils' tools/Makefile:122: recipe for target 'tools/firmware-utils/compile' failed make[2]: *** [tools/firmware-utils/compile] Error 2 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking for x86_64-linux-gnu-gcc... gcc checking whether the C compiler works... no configure: error: in `/home/bell/nm/openwrt-15.05.1/build_dir/host/patch-2.7.5': configure: error: C compiler cannot create executables See `config.log' for more details Makefile:21: recipe for target '/home/bell/nm/openwrt-15.05.1/build_dir/host/patch-2.7.5/.configured' failed make[3]: *** [/home/bell/nm/openwrt-15.05.1/build_dir/host/patch-2.7.5/.configured] Error 77 make[3]: Leaving directory '/home/bell/nm/openwrt-15.05.1/tools/patch' tools/Makefile:122: recipe for target 'tools/patch/compile' failed make[2]: *** [tools/patch/compile] Error 2 make[2]: Leaving directory '/home/bell/nm/openwrt-15.05.1' tools/Makefile:121: recipe for target '/home/bell/nm/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy' failed make[1]: *** [/home/bell/nm/openwrt-15.05.1/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy] Error 2 make[1]: Leaving directory '/home/bell/nm/openwrt-15.05.1' Build failed - please re-run with -j1 to see the real error message /home/bell/nm/openwrt-15.05.1/include/toplevel.mk:181: recipe for target 'world' failed make: *** [world] Error 1 既然cc1在,为啥编译时会如上报错
08-07
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值