设为首页 收藏本站
查看: 828|回复: 0

[经验分享] RedHat下编译Apache出现死循环问题的解决

[复制链接]

尚未签到

发表于 2015-8-4 12:29:25 | 显示全部楼层 |阅读模式
  处理完虚拟机下RedHat的网络配置和SSL连接后,试着安装Apache服务器来学习。
  1、从官网下了一个httpd-2.2.11版本的包,解包都顺利。
2、配置文件,提示错误,需要gcc编译器。应该是安装RedHat的时候选择了最简洁的安装方案,没装上gcc。
3、安装gcc编译器:
  进入Linux,挂载Redhat的第一张安装盘,自动运行,查看到没有安装开发工具中的gcc。使用如下说明安装:
  方法一:在开发工具中选中有gcc编译器的复选框,一路NEXT过去,提示插入第三张盘,插入后一直提示找不到第三张安装盘。试了几次都这样,没法使用安装盘安装。
  方法二:挂载安装盘3,使用命令进入/media/cdrom/.../RPMS/目录:执行以下语句,
  rpm -ivh glibc-kernheaders-2.4-9.1.98.EL.i386.rpm
  rpm -ivh glibc-headers-2.3.4-2.25.i386.rpm
  rpm -ivh glibc-devel-2.3.4-2.25.i386.rpm
  rpm -ivh gcc-3.4.6-3.i386.rpm
  (注:按如上顺序执行,因为有依赖关系。rpm包名的数字是每个redhat linux版本都不一样的。)
  执行成功,再执行一次配置,配置OK。

  4、编译
  编译没有提示有错误或警告出现,但是编译的时间很长。10分、20分、1小时、2小时还在不停编译中。意味着出现了问题,网上搜了一下,按CTRL+C果然有提示出现一个问题,但是很恼火没有问题的描述。
  对编译的信息仔细观察,发现编译一直在重复着一段信息,就像程序进入了死循环。信息摘录如下:


DSC0000.gif DSC0001.gif 编译中出现的重复信息
  1 DSC0002.gif checking build system type DSC0003.gif i686-pc-linux-gnu
  2checking host system type i686-pc-linux-gnu
  3checking target system type i686-pc-linux-gnu
  4checking for gcc gcc
  5checking for C compiler default output file name a.out
  6checking whether the C compiler works yes
  7checking whether we are cross compiling no
  8checking for suffix of executables
  9checking for suffix of object files o
10checking whether we are using the GNU C compiler yes
11checking whether gcc accepts -g yes
12checking for gcc option to accept ISO C89 none needed
13checking for a sed that does not truncate output /bin/sed
14checking for grep that handles long lines and -e /bin/grep
15checking for egrep /bin/grep -E
16checking for ld used by gcc /usr/bin/ld
17checking if the linker (/usr/bin/ld) is GNU ld yes
18checking for /usr/bin/ld option to reload object files -r
19checking for BSD-compatible nm /usr/bin/nm -B
20checking whether ln -s works yes
21checking how to recognize dependent libraries pass_all
22checking how to run the C preprocessor gcc -E
23checking for ANSI C header files yes
24checking for sys/types.h yes
25checking for sys/stat.h yes
26checking for stdlib.h yes
27checking for string.h yes
28checking for memory.h yes
29checking for strings.h yes
30checking for inttypes.h yes
31checking for stdint.h yes
32checking for unistd.h yes
33checking dlfcn.h usability yes
34checking dlfcn.h presence yes
35checking for dlfcn.h yes
36checking for g++ no
37checking for c++ no
38checking for gpp no
39checking for aCC no
40checking for CC no
41checking for cxx no
42checking for cc++ no
43checking for cl.exe no
44checking for FCC no
45checking for KCC no
46checking for RCC no
47checking for xlC_r no
48checking for xlC no
49checking whether we are using the GNU C++ compiler no
50checking whether g++ accepts -g no
51checking for g77 no
52checking for xlf no
53checking for f77 no
54checking for frt no
55checking for pgf77 no
56checking for cf77 no
57checking for fort77 no
58checking for fl32 no
59checking for af77 no
60checking for xlf90 no
61checking for f90 no
62checking for pgf90 no
63checking for pghpf no
64checking for epcf90 no
65checking for gfortran no
66checking for g95 no
67checking for xlf95 no
68checking for f95 no
69checking for fort no
70checking for ifort no
71checking for ifc no
72checking for efc no
73checking for pgf95 no
74checking for lf95 no
75checking for ftn no
76checking whether we are using the GNU Fortran 77 compiler no
77checking whether  accepts -g no
78checking the maximum length of command line arguments 98304
79checking command to parse /usr/bin/nm -B output from gcc object ok
80checking for objdir .libs
81checking for ar ar
82checking for ranlib ranlib
83checking for strip strip
84checking if gcc supports -fno-rtti -fno-exceptions no
85checking for gcc option to produce PIC -fPIC
86checking if gcc PIC flag -fPIC works yes
87checking if gcc static flag -static works yes
88checking if gcc supports -c -o file.o yes
89checking whether the gcc linker (/usr/bin/ld) supports shared libraries yes
90checking whether -lc should be explicitly linked in no
91checking dynamic linker characteristics GNU/Linux ld.so
92checking how to hardcode library paths into programs immediate
93checking whether stripping libraries is possible yes
94checking if libtool supports shared libraries yes
95checking whether to build shared libraries yes
96checking whether to build static libraries yes
97configure: creating libtool
98appending configuration tag "CXX" to libtool
99appending configuration tag "F77" to libtool
100checking for gcc (cached) gcc
101checking whether we are using the GNU C compiler (cached) yes
102checking whether gcc accepts -g (cached) yes
103checking for gcc option to accept ISO C89 (cached) none needed
104checking for a BSD-compatible install /usr/bin/install -c
105checking for ANSI C header files (cached) yes
106checking fcntl.h usability yes
107checking fcntl.h presence yes
108checking for fcntl.h yes
109checking for unistd.h (cached) yes
110checking for string.h (cached) yes
111checking whether byte ordering is bigendian no
112checking for an ANSI C-conforming const yes
113checking for off_t yes
114checking for size_t yes
115checking for working memcmp yes
116checking for stdlib.h (cached) yes
117checking for unistd.h (cached) yes
118checking for getpagesize yes
119checking for working mmap yes
120checking for memmove yes
121checking for bcopy yes
122configure: creating ./config.status
123CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh config.status
124config.status: creating Makefile
125config.status: WARNING:  'Makefile.in' seems to ignore the --datarootdir setting
126make[3]: Leaving directory `/usr/local/mysoftware/apache/httpd-2.2.11/srclib/apr-util/xml/expat'
127make[3]: Entering directory `/usr/local/mysoftware/apache/httpd-2.2.11/srclib/apr-util/xml/expat'
128make[3]: Warning: File `configure' has modification time 1.5e+07 s in the future
129running CONFIG_SHELL=/bin/sh /bin/sh /usr/local/mysoftware/apache/httpd-2.2.11/srclib/apr-util/xml/expat/configure --disable-option-checking --srcdir=/usr/local/mysoftware/apache/httpd-2.2.11/srclib/apr-util --with-apr=../apr --libdir=${prefix}/lib --bindir=${prefix}/bin --cache-file=/dev/null --srcdir=/usr/local/mysoftware/apache/httpd-2.2.11/srclib/apr-util/xml/expat --prefix=/usr/local/apache2 --exec-prefix=/usr/local/apache2 --libdir=/usr/local/apache2/lib --includedir=/usr/local/apache2/include --bindir=/usr/local/apache2/bin --no-create --no-recursion
130  

  回到apache的官网安装说明文档去找相关资料,据说可能是apr和apr-util没有安装的原因,于是就开始安装。在编译apr的时候也发现了死循环了,奇怪了。不过这次有提示信息,提示的大意是系统时钟不准确,可能存在安装不完整。
   恍然大悟,我的Linxu是使用虚拟机的,而虚拟机过期了,需要将虚拟机所在的Window系统时钟调前才能启Linux。于是在Linux调整日期时间那里使用NTP服务同步到网络时间。问题解决,一路下去,非常顺利。

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-94085-1-1.html 上篇帖子: apache httpclient 使用 下篇帖子: Apache Tomcat 服务因 0 (0x0) 服务性错误而停止
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表