- Arch GNU/Linux, «configure: error: no acceptable C compiler found in $PATH» (and others) #1891
- Comments
- panth0r commented May 12, 2013
- mpapis commented May 12, 2013
- panth0r commented May 13, 2013
- How to Resolve Configure: Error: no acceptable C compiler found in $PATH
- Python Installation
- no acceptable C compiler found in $PATH
- libffi-devel is Required
- GeoIP Installation via PECL
- no acceptable C compiler found in $PATH
- geoip-1.1.1 is Required
- Why do I get «configure:error: no acceptable C compiler found in $PATH» when installing GCC on my Apache server?
- Platform.
- Core tests.
- Cache variables.
- Output variables.
- File substitutions.
Arch GNU/Linux, «configure: error: no acceptable C compiler found in $PATH» (and others) #1891
Comments
panth0r commented May 12, 2013
[Actually, took a look at the code; both «make» and «gcc» are in rvm’s «/scripts/functions/requirements/» «requirements_arch_define» function, so don’t really know what’s happened here. Based on this revelation, some context: after installing RVM and before installing any Rubies via RVM, I changed to an existing project’s directory and ran «rvm —rvmrc —create ruby-2.0.0-p0@project», this command printed something along the lines of «ruby-2.0.0-p0 not installed, please run ‘rvm install ruby-2.0.0-p0′»; an rvmrc file for the project was not created (which seems like good behavior). So I took its advice and ended up here.]
To wit, ruby-2.0.0-p0 (perhaps other Rubies, as well) an «acceptable C compiler»:
configure: error: in `/home/panth0r/.rvm/src/ruby-2.0.0-p0′:
configure: error: no acceptable C compiler found in $PATH»
as well as «GNU Make»:
«checking if make is GNU make. ./configure: line 18790: make: command not found
no
checking for safe null command for make. configure: error: no candidate for safe null command»
The «solution» is straightforward: just «$ sudo pacman -Syu make gcc» (maybe others, depending on what the logs say). I’m guessing RVM presupposes the «base-devel» group is installed and feel as though you should drop this assumption and consider at least one of the following:
- include appropriate logic in «autolibs»
- on the Arch side of things, pulling the entire «base-devel» group would be overkill, but.
- a good chunk of people would probably just go with it and
- others could easily install the individual packages manually (well, «easily» if they’re documented)
- on the Arch side of things, pulling the entire «base-devel» group would be overkill, but.
- include this information in the «requirements» or «notes»
- this is probably overkill, as installing other Rubies may not require these extras
- include information about this on RVM’s Arch «Interpreter» page (https://rvm.io/os/archlinux/)
The text was updated successfully, but these errors were encountered:
mpapis commented May 12, 2013
both gcc and make are listed in default requirements: https://github.com/wayneeseguin/rvm/blob/master/scripts/functions/requirements/arch#L41 — please make sure to test after:
If it still fails o install the packages please provide a gist of:
panth0r commented May 13, 2013
Thank you for replying: I mentioned «gcc» and «make» being in the requirements after checking the code; the context I tried to explain (in bracketed people-words) raised the issue of trying to install a Ruby after adding an «.rvmrc» to an existing project. This occurred after re-installing Arch and installing RVM shortly thereafter (hence, only the «base» package was installed, but this is entering irrelevant territory).
Anywho, in order to try replicating the issue, I entered a directory for another existing project that lacked an «.rvmrc» file and issued «rvm —rvmrc —create 1.9.3@[project_name]»; doing so produced the same (respectively-speaking) output:
[panth0r@gray [project_name]]$ rvm —rvmrc —create 1.9.3-p392@[project_name]
ruby-1.9.3-p392 is not installed.
To install do: ‘rvm install ruby-1.9.3-p392’
So after removing make and gcc as well as any of their other dependencies that lacked other dependents: «sudo pacman -Rsc make gcc», I ran «rvm get head», «rvm autolibs enable» and «rvm install ruby-1.9.3-p392», doing so resulted in the following output:
Searching for binary rubies, this might take some time.
No binary rubies available for: arch/libc-2.17/x86_64/ruby-1.9.3-p392.
Continuing with compilation. Please read ‘rvm mount’ to get more information on binary rubies.
Installing requirements for arch, might require sudo password.
Installing Ruby from source to: /home/panth0r/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s).
ruby-1.9.3-p392 — #downloading ruby-1.9.3-p392, this may take a while depending on your connection.
######################################################################## 100.0%
ruby-1.9.3-p392 — #extracting ruby-1.9.3-p392 to /home/panth0r/.rvm/src/ruby-1.9.3-p392
ruby-1.9.3-p392 — #extracted to /home/panth0r/.rvm/src/ruby-1.9.3-p392
ruby-1.9.3-p392 — #configuring.
Error running ‘./configure —prefix=/home/panth0r/.rvm/rubies/ruby-1.9.3-p392 —disable-install-doc —enable-shared’,
please read /home/panth0r/.rvm/log/ruby-1.9.3-p392/1368407510_configure.log
There has been an error while running configure. Halting the installation.
Then, running «rvm install ruby-1.9.2-p392 —debug» produces the following:
Источник
How to Resolve Configure: Error: no acceptable C compiler found in $PATH
Python Installation
Tried to install python 3.7.1 in Linux and met this error: «configure: error: no acceptable C compiler found in $PATH». No doubt, this error will also appear in Ubuntu and CentOS.
First of all, I downloaded the source from python official site, and then extract it.
[root@test python]# curl -O https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 21.7M 100 21.7M 0 0 850k 0 0:00:26 0:00:26 —:—:— 959k
[root@test python]# tar -zxf Python-3.7.1.tgz
[root@test python]# cd *
[root@test Python-3.7.1]# mkdir mypython
Now we start to configure it to a predefined destination.
[root@test Python-3.7.1]# ./configure —prefix=$HOME/python/mypython
.
checking MACHDEP. checking for —without-gcc. no
checking for —with-icc. no
checking for gcc. no
checking for cc. no
checking for cl.exe. no
configure: error: in `/root/python/Python-3.7.1′:
configure: error: no acceptable C compiler found in $PATH
See `config.log’ for more details
no acceptable C compiler found in $PATH
This configuration error seemed to be related to missing or found no acceptable C compilers in $PATH. Since we are using a minimal version of Linux, it doesn’t have gcc (GNU Compiler Collection) package installed, which is a proper and suitable C compiler for make .
And what is $PATH? PATH is an environment variable on Unix-like operating systems, DOS, OS/2, and Microsoft Windows, specifying a set of directories where executable programs are located. In general, each executing process or user session has its own PATH setting.
Since the installer found no C compiler in $PATH , a string that puts conventional binary directories together, such as /usr/bin , /usr/local/bin or /sbin , etc. to compile the source, it threw «Configure: Error: no acceptable C compiler found in $PATH» to alert users to fix the problem.
So next, I install the proper C compiler gcc by the following command and then it will appear in $PATH afterwards:
In fact, there’s a better way to pass all dependency issue like «no acceptable C compiler found in $PATH» during whole installation. That is to say, you may need all essential development tools including all kinds of supportive and acceptable compilers.
]# yum -y groupinstall «Development Tools»
.
Now we can try it again and finish the rest of the installation.
[root@test Python-3.7.1]# ./configure —prefix=$HOME/python/mypython
.
[root@test Python-3.7.1]# make
.
[root@test Python-3.7.1]# make test
.
[root@test Python-3.7.1]# make install
.
ModuleNotFoundError: No module named ‘_ctypes’
make: *** [install] Error 1
There came a message that complained about «No module named ‘_ctypes'». Now we have a library dependency problem.
libffi-devel is Required
Even if the configuration is done well and C compiler is now acceptable in $PATH, we found another issue about C compiler interface occurred during make install . In addition to C compiler, we need libffi-devel package to act as the foreign function interface for C compiler to provide ctypes and rest modules.
[root@test Python-3.7.1]# yum -y install libffi-devel
.
Let’s do it again. This time, make install found an acceptable C compiler in $PATH and worked well.
[root@test Python-3.7.1]# make install
.
Looking in links: /tmp/tmp8b7ksh64
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-10.0.1 setuptools-39.0.1
I don’t see «Configure: Error: no acceptable C compiler found in $PATH». Do you?
GeoIP Installation via PECL
Same error «no acceptable C compiler found in $PATH» occurred when installing geoip via PECL utility.
]# pecl install geoip-1.1.1
.
checking for cc. no
checking for gcc. no
configure: error: in `/var/tmp/pear-build-rootS2pmRo/geoip-1.1.1′:
configure: error: no acceptable C compiler found in $PATH
See `config.log’ for more details
ERROR: `/var/tmp/geoip/configure —with-php-config=/usr/bin/php-config’ failed
Although PECL is not a C compiler, it’s a utility that can assist PHP packages to be installed. During the package installation, PECL need C compiler to make source. Eventually, it cannot find any C compiler in conventional $PATH.
no acceptable C compiler found in $PATH
Same error occurred again. So I installed development tools, a package group just like the above solution in python installation.
]# yum -y groupinstall «Development Tools»
.
]# pecl install geoip-1.1.1
downloading geoip-1.1.1.tgz .
Starting to download geoip-1.1.1.tgz (13,004 bytes)
.
checking for geoip files in default path. not found
configure: error: Please reinstall the geoip distribution
ERROR: `/var/tmp/geoip/configure —with-php-config=/usr/bin/php-config’ failed
It still failed, but it’s not about «no acceptable C compiler found in $PATH». It’s about geoip-1.1.1.
geoip-1.1.1 is Required
No such «Configure: Error: no acceptable C compiler found in $PATH» this time. But we have another error which told us to install a proper package called geoip-devel first.
]# yum -y install geoip-devel
.
Then I tried to make it right again.
]# pecl install geoip-1.1.1
downloading geoip-1.1.1.tgz .
Starting to download geoip-1.1.1.tgz (13,004 bytes)
.
Build process completed successfully
Installing ‘/usr/lib64/php/modules/geoip.so’
install ok: channel://pecl.php.net/geoip-1.1.1
configuration option «php_ini» is not set to php.ini location
You should add «extension=geoip.so» to php.ini
This time, we’re good.
As for Debian or its variants, you can run the equivalent command: sudo aptitude install build-essential
to solve the configuration error.
In conclusion, the lesson I learned from this error «no acceptable C compiler found in $PATH» is that we should know and install all dependencies of configuration packages before installing python and geoip. In this case, we need an acceptable C compiler found in $PATH in order to make install all kinds of sources.
Источник
Why do I get «configure:error: no acceptable C compiler found in $PATH» when installing GCC on my Apache server?
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:
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
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 See config.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=’$
File substitutions.
alphaieee_frag=» host_makefile_frag=’/dev/null’ ospace_frag=» serialization_dependencies=» target_makefile_frag=»
Источник