问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

centos7编译php5.4.38时出错

发布网友 发布时间:2022-04-25 17:44

我来回答

1个回答

热心网友 时间:2023-10-22 18:38

1. centos7信息

uname -a

Linux dev 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

2. 运行 ./configure 报错

configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
3. 运行 grep error config.log

cc: error: unrecognized command line option '-V'
cc: fatal error: no input files
cc: error: unrecognized command line option '-qversion'
cc: fatal error: no input files
conftest.c:9:19: fatal error: stdio.h: No such file or directory
configure:4076: error: in `/usr/local/src/php-5.6.19':
configure:4078: error: cannot run C compiled programs.

4. 按照网上说的方法 在configure后面加上了 --host=x86_64 ,报错
configure: error: in `/usr/local/src/php-5.6.19':
configure: error: C preprocessor "/lib/cpp" fails sanity check
5. config.log中错误提示,差好几个头文件

cc: error: unrecognized command line option '-V'
cc: fatal error: no input files
cc: error: unrecognized command line option '-qversion'
cc: fatal error: no input files
conftest.c:9:19: fatal error: stdio.h: No such file or directory
configure:4076: error: in `/usr/local/src/php-5.6.19':
configure:4078: error: cannot run C compiled programs.
[root@dev php-5.6.19]# grep error config.log
cc: error: unrecognized command line option '-V'
cc: fatal error: no input files
cc: error: unrecognized command line option '-qversion'
cc: fatal error: no input files
conftest.c:9:19: fatal error: stdio.h: No such file or directory
conftest.c:9:20: fatal error: stdarg.h: No such file or directory
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-qlanglvl=extc89'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-qlanglvl=ansi'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-std'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
<command-line>:0:1: error: missing '(' after predicate
conftest.c:9:20: fatal error: stdarg.h: No such file or directory
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
<command-line>:0:1: error: missing '(' after predicate
conftest.c:9:20: fatal error: stdarg.h: No such file or directory
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-Xc'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:12:0: fatal error: assert.h: No such file or directory
| Syntax error
conftest.c:12:0: fatal error: assert.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
configure:4478: error: in `/usr/local/src/php-5.6.19':
configure:4480: error: C preprocessor "/lib/cpp" fails sanity check

6. gcc安装信息

[root@dev php-5.6.19]# rpm -qa | grep glibc
compat-glibc-headers-2.12-4.el7.centos.x86_64
glibc-utils-2.17-106.el7_2.4.x86_64
glibc-common-2.17-106.el7_2.4.x86_64
glibc-devel-2.17-106.el7_2.4.x86_64
glibc-static-2.17-106.el7_2.4.x86_64
glibc-2.17-106.el7_2.4.x86_64
glibc-headers-2.17-106.el7_2.4.x86_64
compat-glibc-2.12-4.el7.centos.x86_64

[root@dev php-5.6.19]# gcc -v
Using built-in specs.

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)追问感觉我们说的不是同一个问题

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
幼儿园应该如何开展推广普通话的活动呢? STM32 | 遇到HardFault问题如何定位? 当别人说话很难听或使我难堪的时候,我的心理就会涌上一种暴力解决的念头... 美金为什么会下跌 为什么美金疯狂贬值 为什么美金下滑 京东客服兼职如何申请?有哪些要求? 京东兼职客服一个月能赚多少?怎么做兼职? 为什么海信电视遥控器只能关机不能开机? 张继科有没有拿过奥运冠军 redhat4.8 所有命令被删除怎么办 centos7编译freeswitch-1.8.2版本,make报错,手动升级了openssl? 如何用PPT画图教程.ppt 如何在ppt里面画图 手动和手工有什么区别,产品经理,软件,设计 软件设计师考试上午和下午考试方式区别是什么? .net工程师和主编程语言是C++的软件设计师有什么区别呀? 软件设计师考试同步辅导 (上午科目)(下午科目)与软件设计师教程有什么区别啊 中级程序员和软件设计师考试有什么区别?二者的认证机构分别是谁? 银行卡上存定期在取款机上有显示吗? 我的钱存定期,银行卡里为什么不显示?如果我要把钱取出来要怎么取? 银行卡定期存款到期了卡里有显示吗 建设银行卡存定期的钱只有一张凭据但卡里没有显示这些定期存款,查余额也查不到? 用Mac怎么把蓝底照片变成白底照片 我存的定期银行卡上不显示也没给凭证怎么办? vivox30参数配置详情介绍 vivo5gx30用哪家屏? 中国银行购买大额存单的渠道有哪些? 银行大额存单有哪些优点?四大行的大额存单都一样吗? 海尔冰箱bcd-225sdcw如何调温 redhat linux 9.0和redhat linux 5哪个版本才是新版本 redhat中vsftp安装虚拟用户 redhat linux 哪个版本较好 downloading red giant link update sql注入 安全测试 靠参数过滤可行吗 SQL注入是怎么回事 求:在微信收藏笔记里录制的音频文件,怎样才能导出至电脑或手机里? 在微信收藏笔记中的录音文件拷贝或另存问题,求答案! 微信笔记的录音怎么下载 微信收藏笔记里的录音怎么改成MP3 微信收藏语音怎样保存转发出去? 羽毛球拍拉26磅,线应该如何选择? 羽毛球拍拉什么线好。 羽毛球拍拉线哪种线比较好? 如何选择羽毛球拍拉线的磅数 羽毛球拍专业拉线怎样选线,拉多少合适? 羽毛球拍的拍线的选择 怎样选择羽毛球拍拍线 vivo相册视频设置为动态壁纸 兴仁县人力资源和社会保障局的行政审批股