免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12345下一页
最近访问板块 发新帖
查看: 30932 | 回复: 48
打印 上一主题 下一主题

C preprocessor "/lib/cpp" fails sanity check 该怎么办? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-04-05 09:39 |只看该作者 |倒序浏览
请教各位,我遇到了两个问题,第一个:当我输入./configure的时候,发生了 configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.这样的错误。有人说是由于我的系统缺少gcc-c的编辑器,可我仔细看了我的系统,这些编辑器我全部都安装过了。
第二个:根据有人提及的我可以输入apt-get install build-essential命令,可当我输入就出现bash: apt-get: command not found的错误。有人说是环境变量的问题,可我真是一个初学者,确实不知道该怎么改。请教各位大侠,小弟不胜感激。
以下是我的命令行:

[root@localhost minigui]# cd /home/minigui/libminigui-1.6.10
[root@localhost libminigui-1.6.10]# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for ranlib... ranlib
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... /bin/sed
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking command to parse /usr/bin/nm -B output... ok
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.

[root@localhost libminigui-1.6.10]# apt-get
bash: apt-get: command not found
[root@localhost libminigui-1.6.10]# apt-get install build-essential
bash: apt-get: command not found

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
2 [报告]
发表于 2010-04-05 09:43 |只看该作者
apt-get不能用?
楼主的系统不是Ubuntu吧

论坛徽章:
0
3 [报告]
发表于 2010-04-05 09:50 |只看该作者
回复 2# chenyx


    我只知道我用的是linux2.6内核,小红帽enterprise linux4

论坛徽章:
0
4 [报告]
发表于 2010-04-05 09:56 |只看该作者
可能是没有C语言的编译软件,可检查机子上有没有GCC,G++

论坛徽章:
4
CU大牛徽章
日期:2013-03-13 15:29:07CU大牛徽章
日期:2013-03-13 15:29:49CU大牛徽章
日期:2013-03-13 15:30:192015年迎新春徽章
日期:2015-03-04 09:57:09
5 [报告]
发表于 2010-04-05 10:03 |只看该作者
回复  chenyx


    我只知道我用的是linux2.6内核,小红帽enterprise linux4
mch_kot 发表于 2010-04-05 09:50



    红帽可以自己下载rpm包安装rpm.pbone.net/这里找gcc

论坛徽章:
0
6 [报告]
发表于 2010-04-05 10:04 |只看该作者
回复 4# linux初学三月


    开发工具包里的包括GCC的开发工具的73个东西,我都装全了,但问题还是依旧

论坛徽章:
0
7 [报告]
发表于 2010-04-05 10:06 |只看该作者
在上面显示错误的基础上,当我输入make命令后会显示: make:*** 没有指明目标并且找不到makefile.停止。

论坛徽章:
4
CU大牛徽章
日期:2013-03-13 15:29:07CU大牛徽章
日期:2013-03-13 15:29:49CU大牛徽章
日期:2013-03-13 15:30:192015年迎新春徽章
日期:2015-03-04 09:57:09
8 [报告]
发表于 2010-04-05 10:19 |只看该作者
在上面显示错误的基础上,当我输入make命令后会显示: make:*** 没有指明目标并且找不到makefile.停止。
mch_kot 发表于 2010-04-05 10:06



    没有makefile文件运行
./configure

论坛徽章:
0
9 [报告]
发表于 2010-04-05 10:45 |只看该作者
回复 8# dooros


    目前我./configure    make等都有问题,但同样的程序安装包在别人机子上就没有问题,我想一定是我哪里没有设好,请教各位了

论坛徽章:
4
CU大牛徽章
日期:2013-03-13 15:29:07CU大牛徽章
日期:2013-03-13 15:29:49CU大牛徽章
日期:2013-03-13 15:30:192015年迎新春徽章
日期:2015-03-04 09:57:09
10 [报告]
发表于 2010-04-05 10:53 |只看该作者
回复  dooros


    目前我./configure    make等都有问题,但同样的程序安装包在别人机子上就没有问题 ...
mch_kot 发表于 2010-04-05 10:45



    安装linux头文件包,就是linux-...-header.....
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP