gcc: error trying to exec 'cc1': execvp: 没有该文件或目录 编译内核时出现的问题

编译打包和其他
回复
yiqisetian
帖子: 17
注册时间: 2007-08-03 13:56

gcc: error trying to exec 'cc1': execvp: 没有该文件或目录 编译内核时出现的问题

#1

帖子 yiqisetian » 2008-09-13 7:44

如题 ,在配置完开始编译的时候出现这个错误,不知道是gcc的配置哪里出了问题,好像是路径的设置,不过从系统安装到gcc的一些相关包的安装,我都是选择默认的形式,没有改过任何东西,为什么还会出现这样的错误。请大家帮忙,谢谢。

另外,用gcc -v查看后结果如下:
使用内建 specs。
目标:i486-linux-gnu
配置为:../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
线程模型:posix
gcc 版本 4.2.4 (Ubuntu 4.2.4-1ubuntu1)

whereis gcc结果如下
gcc: /usr/bin/gcc /usr/lib/gcc /usr/share/man/man1/gcc.1.gz
上次由 yiqisetian 在 2008-09-21 6:48,总共编辑 1 次。
yiqisetian
帖子: 17
注册时间: 2007-08-03 13:56

#2

帖子 yiqisetian » 2008-09-14 7:06

没人遇见过类似问题吗,怎么只有阅读,没有人回答阿,自顶一下
yiqisetian
帖子: 17
注册时间: 2007-08-03 13:56

#3

帖子 yiqisetian » 2008-09-28 23:30

看来要自己想办法了
,再顶一下
yiqisetian
帖子: 17
注册时间: 2007-08-03 13:56

Re: gcc: error trying to exec 'cc1': execvp: 没有该文件或目录 编译内核时出现的问题

#4

帖子 yiqisetian » 2008-09-30 18:54

找到答案了,原来是gcc-4.2的一个bug

Brian M. Carlson writes:
> Package: gcc-4.2
> Version: 4.2-20070307-1
> Severity: grave
>
> When I try to run gcc-4.2, it says:
> gcc-4.2: error trying to exec 'cc1': execvp: No such file or directory
>
> Needless to say, a compiler that doesn't compile is rather useless,
> hence the severity.
>
> I discovered this whilst trying to build an autoconf-using program with
> gcc-4.2.
>
> Apparently, it is looking in /usr/lib/gcc/x86_64-linux-gnu/4.2.0,
> because if I symlink that to /usr/lib/gcc/x86_64-linux-gnu/4.2 (where
> cc1 is), it works. Note that /usr/lib/gcc/x86_64-linux-gnu/4.2.0 was an
> empty directory; I moved it out of the way to make the symlink. Merely
> moving it out of the way without creating the symlink did not cause
> gcc-4.2 to work.

known; as a workaround, remove all *-4.2 packages and reinstall
poppoise
帖子: 1
注册时间: 2009-11-20 16:56

Re: gcc: error trying to exec 'cc1': execvp: 没有该文件或目录 编译内核时出现的问题

#5

帖子 poppoise » 2009-11-20 17:11

你好,我的也遇到了这种问题,我也刚接触嵌入式,能帮我一下吗?
341719xubin@163.com
具体的方法,谢谢了!
回复