配置zabbix的时候报错configure: error: no acceptable C compiler found in $PATH

解决办法:安装GCC软件套件

 
  
  1. [root@localhost opt]# pwd 
  2. /opt 
  3. [root@localhost opt]# ls 
  4. MySQL-client-community-5.1.49-1.rhel5.x86_64.rpm  zabbix-1.8.10 
  5. MySQL-server-community-5.1.49-1.rhel5.x86_64.rpm  zabbix-1.8.10.tar.gz 
  6. [root@localhost opt]# cd zabbix-1.8.10 
  7. [root@localhost zabbix-1.8.10]# ls 
  8. aclocal.m4  build      config.guess  configure.in  CREDITS    include     m4           man      NEWS    upgrades 
  9. AUTHORS     ChangeLog  config.sub    COPYING       depcomp    INSTALL     Makefile.am  misc     README 
  10. bin         compile    configure     create        frontends  install-sh  Makefile.in  missing  src 
  11. [root@localhost zabbix-1.8.10]# ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-jabber --with-libcurl 
  12. checking for a BSD-compatible install... /usr/bin/install -c 
  13. checking whether build environment is sane... yes 
  14. checking for a thread-safe mkdir -p... /bin/mkdir -p 
  15. checking for gawk... gawk 
  16. checking whether make sets $(MAKE)... yes 
  17. configure: Configuring  
  18. checking whether make sets $(MAKE)... (cached) yes 
  19. checking build system type... x86_64-unknown-linux-gnu 
  20. checking host system type... x86_64-unknown-linux-gnu 
  21. checking for gcc... no 
  22. checking for cc... no 
  23. checking for cl.exe... no 
  24. configure: error: in `/opt/zabbix-1.8.10': 
  25. configure: error: no acceptable C compiler found in $PATH 
  26. See `config.log' for more details 
  27. [root@localhost zabbix-1.8.10]# ls 
  28. aclocal.m4  build      config.guess  configure     create   frontends  install-sh   Makefile.in  missing  src 
  29. AUTHORS     ChangeLog  config.log    configure.in  CREDITS  include    m4           man          NEWS     upgrades 
  30. bin         compile    config.sub    COPYING       depcomp  INSTALL    Makefile.am  misc         README 
  31. [root@localhost zabbix-1.8.10]# less config.log 
  32. [root@localhost zabbix-1.8.10]# pwd 
  33. /opt/zabbix-1.8.10 
  34. [root@localhost zabbix-1.8.10]# cd /media/RHEL_5.5 x86_64 DVD/Server 
  35. -bash: cd: /media/RHEL_5.5: No such file or directory 
  36. [root@localhost zabbix-1.8.10]# cd /media/RHEL_5.5\ x86_64\ DVD/Server/ 
  37. [root@localhost Server]# rpm -ivh kernel-headers-2.6.18-194.el5.x86_64.rpm 
  38. warning: kernel-headers-2.6.18-194.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 
  39. Preparing...                ########################################### [100%] 
  40.    1:kernel-headers         ########################################### [100%] 
  41. [root@localhost Server]# rpm -ivh cpp-4.1.2-48.el5.x86_64.rpm 
  42. warning: cpp-4.1.2-48.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 
  43. Preparing...                ########################################### [100%] 
  44.  package cpp-4.1.2-48.el5.x86_64 is already installed 
  45. [root@localhost Server]# rpm -ivh glibc- 
  46. glibc-2.5-49.i686.rpm            glibc-common-2.5-49.x86_64.rpm   glibc-devel-2.5-49.x86_64.rpm    glibc-utils-2.5-49.x86_64.rpm 
  47. glibc-2.5-49.x86_64.rpm          glibc-devel-2.5-49.i386.rpm      glibc-headers-2.5-49.x86_64.rpm  
  48. [root@localhost Server]# rpm -ivh glibc-headers-2.5-49.x86_64.rpm 
  49. warning: glibc-headers-2.5-49.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 
  50. Preparing...                ########################################### [100%] 
  51.    1:glibc-headers          ########################################### [100%] 
  52. [root@localhost Server]# rpm -ivh glibc-devel-2.5-49. 
  53. glibc-devel-2.5-49.i386.rpm    glibc-devel-2.5-49.x86_64.rpm  
  54. [root@localhost Server]# rpm -ivh glibc-devel-2.5-49.x86_64.rpm 
  55. warning: glibc-devel-2.5-49.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 
  56. Preparing...                ########################################### [100%] 
  57.    1:glibc-devel            ########################################### [100%] 
  58. [root@localhost Server]# rpm -ivh gcc 
  59. gcc-4.1.2-48.el5.x86_64.rpm            gcc-c++-4.1.2-48.el5.x86_64.rpm        gcc-objc-4.1.2-48.el5.x86_64.rpm 
  60. gcc44-4.4.0-6.el5.x86_64.rpm           gcc-gfortran-4.1.2-48.el5.x86_64.rpm   gcc-objc++-4.1.2-48.el5.x86_64.rpm 
  61. gcc44-c++-4.4.0-6.el5.x86_64.rpm       gcc-gnat-4.1.2-48.el5.x86_64.rpm       
  62. gcc44-gfortran-4.4.0-6.el5.x86_64.rpm  gcc-java-4.1.2-48.el5.x86_64.rpm       
  63. [root@localhost Server]# rpm -ivh gcc-4.1.2-48.el5.x86_64.rpm 
  64. warning: gcc-4.1.2-48.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 
  65. error: Failed dependencies: 
  66.  libgomp >= 4.1.2-48.el5 is needed by gcc-4.1.2-48.el5.x86_64 
  67. [root@localhost Server]# rpm -ivh libgomp-4.4.0-6.el5. 
  68. libgomp-4.4.0-6.el5.i386.rpm    libgomp-4.4.0-6.el5.x86_64.rpm  
  69. [root@localhost Server]# rpm -ivh libgomp-4.4.0-6.el5.x86_64.rpm 
  70. warning: libgomp-4.4.0-6.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 
  71. Preparing...                ########################################### [100%] 
  72.    1:libgomp                ########################################### [100%] 
  73. [root@localhost Server]#rpm -ivh gcc-4.1.2-48.el5.x86_64.rpm 
  74. warning: gcc-4.1.2-48.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186 
  75. Preparing...                ########################################### [100%] 
  76.    1:gcc                    ########################################### [100%] 
  77. [root@localhost Server]# 
  78.  
  79. [root@localhost zabbix-1.8.10]# ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-jabber --with-libcurl 
  80. checking for a BSD-compatible install... /usr/bin/install -c 
  81. checking whether build environment is sane... yes 
  82. checking for a thread-safe mkdir -p... /bin/mkdir -p 
  83. checking for gawk... gawk 
  84. checking whether make sets $(MAKE)... yes 
  85. configure: Configuring  
  86. checking whether make sets $(MAKE)... (cached) yes 
  87. checking build system type... x86_64-unknown-linux-gnu 
  88. checking host system type... x86_64-unknown-linux-gnu 
  89. checking for gcc... gcc 
  90. checking whether the C compiler works... yes 
  91. checking for C compiler default output file name... a.out 
  92. checking for suffix of executables... 
  93. checking whether we are cross compiling... no 
  94. checking for suffix of object files... o 
  95. checking whether we are using the GNU C compiler... yes 
  96. checking whether gcc accepts -g... yes 
  97. checking for gcc option to accept ISO C89... none needed 
  98. checking for style of include used by make... GNU 
  99. checking dependency style of gcc... gcc3