Why do I get "configure:error: no acceptable C compiler found in $PATH" when installing GCC on my Apache server?

21,246

Are you trying to build gcc from source ? Then you need a compiler to compile it.. (that's a Catch 22...).

Can't you install a binary package with the compiler already compiled ?

Share:
21,246
user374372
Author by

user374372

Updated on August 18, 2020

Comments

  • user374372
    user374372 over 3 years

    I'm attempting to install GCC 4.5.1 on my Apache server, but it says there is no acceptable C compiler found in $PATH. Any suggestions on what to do would be greatly appreciated.

    When I use echo $PATH it prints:

    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/:/var/lib/:/usr/share/

    These are the commands I used to configure GCC:

    sudo mkdir /usr/bin/gcc/
    cd /usr/bin/gcc/
    sudo /gcc-4.5.1/configure

    These are the results of those commands:

    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking target system type... x86_64-unknown-linux-gnu
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether ln works... yes
    checking whether ln -s works... yes
    checking for a sed that does not truncate output... /bin/sed
    checking for gawk... no
    checking for mawk... mawk
    checking for gcc... no
    checking for cc... no
    checking for cl.exe... no
    configure: error: in '/usr/bin/gcc:'`
    configure: error: no acceptable C compiler found in $PATH
    See 'config.log' for more details.

    The file config.log contains:

    This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.

    It was created by configure, which was generated by GNU Autoconf 2.64. Invocation command line was

    $ /gcc-4.5.1/configure

    ---------

    Platform.

    ---------

    hostname = wordpress-juicesite uname -m = x86_64 uname -r = 2.6.31-302-rs uname -s = Linux uname -v = #7 SMP Thu Oct 29 22:57:03 UTC 2009

    /usr/bin/uname -p = unknown /bin/uname -X = unknown

    /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown

    PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /sbin PATH: /bin PATH: /usr/X11R6/bin

    -----------

    Core tests.

    -----------

    configure:2429: checking build system type configure:2443: result: x86_64-unknown-linux-gnu configure:2490: checking host system type configure:2503: result: x86_64-unknown-linux-gnu configure:2523: checking target system type configure:2536: result: x86_64-unknown-linux-gnu configure:2590: checking for a BSD-compatible install configure:2658: result: /usr/bin/install -c configure:2669: checking whether ln works configure:2691: result: yes configure:2695: checking whether ln -s works configure:2699: result: yes configure:2706: checking for a sed that does not truncate output configure:2770: result: /bin/sed configure:2779: checking for gawk configure:2809: result: no configure:2779: checking for mawk configure:2795: found /usr/bin/mawk configure:2806: result: mawk configure:4039: checking for gcc configure:4069: result: no configure:4132: checking for cc configure:4179: result: no configure:4235: checking for cl.exe configure:4265: result: no configure:4289: error: in /usr/bin/gcc': configure:4292: error: no acceptable C compiler found in $PATH Seeconfig.log' for more details.

    ----------------

    Cache variables.

    ----------------

    ac_cv_build=x86_64-unknown-linux-gnu ac_cv_env_AR_FOR_TARGET_set= ac_cv_env_AR_FOR_TARGET_value= ac_cv_env_AR_set= ac_cv_env_AR_value= ac_cv_env_AS_FOR_TARGET_set= ac_cv_env_AS_FOR_TARGET_value= ac_cv_env_AS_set= ac_cv_env_AS_value= ac_cv_env_CCC_set= ac_cv_env_CCC_value= ac_cv_env_CC_FOR_TARGET_set= ac_cv_env_CC_FOR_TARGET_value= ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set= ac_cv_env_CFLAGS_value= ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_CXXFLAGS_set= ac_cv_env_CXXFLAGS_value= ac_cv_env_CXX_FOR_TARGET_set= ac_cv_env_CXX_FOR_TARGET_value= ac_cv_env_CXX_set= ac_cv_env_CXX_value= ac_cv_env_DLLTOOL_FOR_TARGET_set= ac_cv_env_DLLTOOL_FOR_TARGET_value= ac_cv_env_DLLTOOL_set= ac_cv_env_DLLTOOL_value= ac_cv_env_GCC_FOR_TARGET_set= ac_cv_env_GCC_FOR_TARGET_value= ac_cv_env_GCJ_FOR_TARGET_set= ac_cv_env_GCJ_FOR_TARGET_value= ac_cv_env_GFORTRAN_FOR_TARGET_set= ac_cv_env_GFORTRAN_FOR_TARGET_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_LD_FOR_TARGET_set= ac_cv_env_LD_FOR_TARGET_value= ac_cv_env_LD_set= ac_cv_env_LD_value= ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_LIPO_FOR_TARGET_set= ac_cv_env_LIPO_FOR_TARGET_value= ac_cv_env_LIPO_set= ac_cv_env_LIPO_value= ac_cv_env_NM_FOR_TARGET_set= ac_cv_env_NM_FOR_TARGET_value= ac_cv_env_NM_set= ac_cv_env_NM_value= ac_cv_env_OBJCOPY_set= ac_cv_env_OBJCOPY_value= ac_cv_env_OBJDUMP_FOR_TARGET_set= ac_cv_env_OBJDUMP_FOR_TARGET_value= ac_cv_env_OBJDUMP_set= ac_cv_env_OBJDUMP_value= ac_cv_env_RANLIB_FOR_TARGET_set= ac_cv_env_RANLIB_FOR_TARGET_value= ac_cv_env_RANLIB_set= ac_cv_env_RANLIB_value= ac_cv_env_STRIP_FOR_TARGET_set= ac_cv_env_STRIP_FOR_TARGET_value= ac_cv_env_STRIP_set= ac_cv_env_STRIP_value= ac_cv_env_WINDMC_FOR_TARGET_set= ac_cv_env_WINDMC_FOR_TARGET_value= ac_cv_env_WINDMC_set= ac_cv_env_WINDMC_value= ac_cv_env_WINDRES_FOR_TARGET_set= ac_cv_env_WINDRES_FOR_TARGET_value= ac_cv_env_WINDRES_set= ac_cv_env_WINDRES_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_host=x86_64-unknown-linux-gnu ac_cv_path_SED=/bin/sed ac_cv_path_install='/usr/bin/install -c' ac_cv_prog_AWK=mawk ac_cv_target=x86_64-unknown-linux-gnu acx_cv_prog_LN=ln

    -----------------

    Output variables.

    -----------------

    AR='' AR_FOR_BUILD='$(AR)' AR_FOR_TARGET='' AS='' AS_FOR_BUILD='$(AS)' AS_FOR_TARGET='' AWK='mawk' BISON='' BUILD_CONFIG='' CC='' CC_FOR_BUILD='$(CC)' CC_FOR_TARGET='' CFLAGS='' CFLAGS_FOR_BUILD='' CFLAGS_FOR_TARGET='' COMPILER_AS_FOR_TARGET='' COMPILER_LD_FOR_TARGET='' COMPILER_NM_FOR_TARGET='' CONFIGURE_GDB_TK='' CPP='' CPPFLAGS='' CXX='' CXXFLAGS='' CXXFLAGS_FOR_BUILD='' CXXFLAGS_FOR_TARGET='' CXX_FOR_BUILD='$(CXX)' CXX_FOR_TARGET='' DEBUG_PREFIX_CFLAGS_FOR_TARGET='' DEFS='' DLLTOOL='' DLLTOOL_FOR_BUILD='$(DLLTOOL)' DLLTOOL_FOR_TARGET='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' EXEEXT='' EXPECT='' FLAGS_FOR_TARGET='' FLEX='' GCC_FOR_TARGET='' GCC_SHLIB_SUBDIR='' GCJ_FOR_BUILD='$(GCJ)' GCJ_FOR_TARGET='' GDB_TK='' GFORTRAN_FOR_BUILD='$(GFORTRAN)' GFORTRAN_FOR_TARGET='' GNATBIND='' GNATMAKE='' GREP='' INSTALL_DATA='${INSTALL} -m 644' INSTALL_GDB_TK='' INSTALL_PROGRAM='${INSTALL}' INSTALL_SCRIPT='${INSTALL}' LD='' LDFLAGS='' LDFLAGS_FOR_BUILD='' LD_FOR_BUILD='$(LD)' LD_FOR_TARGET='' LEX='' LIBOBJS='' LIBS='' LIPO='' LIPO_FOR_TARGET='' LN='ln' LN_S='ln -s' LTLIBOBJS='' M4='' MAINT='' MAINTAINER_MODE_FALSE='' MAINTAINER_MODE_TRUE='' MAKEINFO='' NM='' NM_FOR_BUILD='$(NM)' NM_FOR_TARGET='' OBJCOPY='' OBJDUMP='' OBJDUMP_FOR_TARGET='' OBJEXT='' PACKAGE_BUGREPORT='' PACKAGE_NAME='' PACKAGE_STRING='' PACKAGE_TARNAME='' PACKAGE_URL='' PACKAGE_VERSION='' PATH_SEPARATOR=':' RANLIB='' RANLIB_FOR_BUILD='$(RANLIB)' RANLIB_FOR_TARGET='' RAW_CXX_FOR_TARGET='' RPATH_ENVVAR='' RUNTEST='' SED='/bin/sed' SHELL='/bin/bash' STRIP='' STRIP_FOR_TARGET='' SYSROOT_CFLAGS_FOR_TARGET='' TOPLEVEL_CONFIGURE_ARGUMENTS='/gcc-4.5.1/configure' WINDMC='' WINDMC_FOR_BUILD='$(WINDMC)' WINDMC_FOR_TARGET='' WINDRES='' WINDRES_FOR_BUILD='$(WINDRES)' WINDRES_FOR_TARGET='' YACC='' ac_ct_CC='' ac_ct_CXX='' bindir='${exec_prefix}/bin' build='x86_64-unknown-linux-gnu' build_alias='' build_configargs='' build_configdirs='build-libiberty build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes' build_cpu='x86_64' build_libsubdir='build-x86_64-unknown-linux-gnu' build_noncanonical='x86_64-unknown-linux-gnu' build_os='linux-gnu' build_subdir='build-x86_64-unknown-linux-gnu' build_tooldir='' build_vendor='unknown' clooginc='' clooglibs='' compare_exclusions='' config_shell='/bin/bash' configdirs='intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr mpc ppl cloog libelf libiconv texinfo byacc flex bison binutils gas ld fixincludes gcc cgen sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools' datadir='${datarootdir}' datarootdir='${prefix}/share' do_compare='' docdir='${datarootdir}/doc/${PACKAGE}' dvidir='${docdir}' exec_prefix='NONE' extra_host_libiberty_configure_flags='' extra_mpc_gmp_configure_flags='' extra_mpc_mpfr_configure_flags='' extra_mpfr_configure_flags='' gmpinc='' gmplibs='' host='x86_64-unknown-linux-gnu' host_alias='' host_configargs='' host_cpu='x86_64' host_noncanonical='x86_64-unknown-linux-gnu' host_os='linux-gnu' host_subdir='.' host_vendor='unknown' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' libdir='${exec_prefix}/lib' libelfinc='' libelflibs='' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' oldincludedir='/usr/include' pdfdir='${docdir}' poststage1_ldflags='' poststage1_libs='' pplinc='' ppllibs='' prefix='NONE' program_transform_name='s,y,y,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' stage1_cflags='' stage1_checking='' stage1_languages='' stage1_ldflags='' stage1_libs='' stage2_werror_flag='' sysconfdir='${prefix}/etc' target='x86_64-unknown-linux-gnu' target_alias='' target_configargs='' target_configdirs='target-libgcc target-libiberty target-libgloss target-newlib target-libgomp target-libstdc++-v3 target-libmudflap target-libssp target-libgfortran target-boehm-gc target-libffi target-zlib target-qthreads target-libjava target-libobjc target-libada target-examples target-groff target-gperf target-rda' target_cpu='x86_64' target_noncanonical='x86_64-unknown-linux-gnu' target_os='linux-gnu' target_subdir='x86_64-unknown-linux-gnu' target_vendor='unknown' tooldir=''

    -------------------

    File substitutions.

    -------------------

    alphaieee_frag='' host_makefile_frag='/dev/null' ospace_frag='' serialization_dependencies='' target_makefile_frag=''

    -----------

    confdefs.h.

    -----------

    /* confdefs.h */

    define PACKAGE_NAME ""

    define PACKAGE_TARNAME ""

    define PACKAGE_VERSION ""

    define PACKAGE_STRING ""

    define PACKAGE_BUGREPORT ""

    define PACKAGE_URL ""

    configure: exit 1