I am installing ruby 3.1 via ruby-install utility on MAC OS (12.6). While execution, I see the following error:
>>>Configuring ruby 3.1.3 ...
checking for ruby... /usr/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... x86_64-apple-darwin21.6.0
checking host system type... x86_64-apple-darwin21.6.0
checking target system type... x86_64-apple-darwin21.6.0
checking for cl.exe... no
checking for clang... clang
checking for llvm-ar... no
checking for clang++... clang++
checking for llvm-nm... no
checking for llvm-objcopy... no
checking for llvm-objdump... no
checking for llvm-ranlib... no
checking for llvm-strip... no
checking for gcc... (cached) clang
checking whether the C compiler works... no
configure: error: in `/Users/jay/src/ruby-3.1.3':
configure: error: C compiler cannot create executables
See `config.log' for more details
!!! Configuration of ruby 3.1.3 failed!
Tried with other utilities and other ruby versions.
Make sure your xcode is updated. Installer was not able to find command line tools and therefore the configuration was not getting set - resulting in failure.
Related
Hi there I was trying to install nrpe in solaris 8. I know that is very old hahah. But when I run ./configure, it shows me this.
./configure
checking for a BSD-compatible install... ./install-sh -c
checking build system type... sparc-sun-solaris2.8
checking host system type... sparc-sun-solaris2.8
checking for gcc...no
checking for cc...no
checking for cc...no
checking for cl...no
configure: error: no aceptable C compiler found in $PATH
There is a way to get this compilers or somenthing like that?
Thanks for support.
When running the configure script for Octave, I do:
./configure CFLAGS="-I/customlibs/pcre/gnu/8.40/include -L/customlibs/pcre/gnu/8.40/lib/" LD_LIBRARY_PATH="/customlibs/pcre/gnu/8.40/lib"
I have also tried:
./configure CFLAGS="-I/customlibs/pcre/gnu/8.40/include" LDFLAGS="-L/customlibs/pcre/gnu/8.40/lib/" LD_LIBRARY_PATH="/customlibs/pcre/gnu/8.40/lib"
Both of these produce the same failure:
checking pcre.h usability... yes
checking pcre.h presence... no
configure: WARNING: pcre.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: pcre.h: proceeding with the compiler's result
checking for pcre.h... yes
checking pcre/pcre.h usability... no
checking pcre/pcre.h presence... no
checking for pcre/pcre.h... no
checking whether pcre.h defines the macros we need... no
configure: error: to build Octave, you must have the PCRE library and header files installed
I'm lost as to how it can find pcre.h but fails to do anything else with it. Am I doing something wrong on my configure line or is pcre broken? If it's my configure line, how do I link against pcre correctly?
For reference, here's the pcre path:
ls /customlibs/pcre/gnu/8.40/
bin
include
lib
share
I was struggling with that for a while as well, but the solution was actually very simple. just use CPPFLAGS rather than CFLAGS for include files:
./configure CPPFLAGS="-I/customlibs/pcre/gnu/8.40/include" LDFLAGS="-L/customlibs/pcre/gnu/8.40/lib/"
There's also no need for LD_LIBRARY_PATH upon configuring.
I am trying to run a haskell file from command prompt. I get the following error :
Failed to load interface for `System.Console.Readline'
Perhaps you meant System.Console.Haskeline (from haskeline-0.7.2.3)
Locations searched:
System\Console\Readline.hs
System\Console\Readline.lhs
System\Console\Readline.hsig
System\Console\Readline.lhsig
I thought readline came as part of cabal when you installed the full version of haskell? (which I have done) Does anyone have any idea how I can fix this?
EDIT: I tried >cabal update, followed by >cabal install readline, and I now get this:
Resolving dependencies...
Configuring readline-1.0.3.0...
Failed to install readline-1.0.3.0
Build log ( C:\Users\Dan\AppData\Roaming\cabal\logs\readline-1.0.3.0.log ):
Configuring readline-1.0.3.0...
bash.exe: warning: could not find /tmp, please create!
checking for gcc... C:\PROGRA~1\HASKEL~1\802E01~1.1\mingw\bin\gcc.exe
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether C:\PROGRA~1\HASKEL~1\802E01~1.1\mingw\bin\gcc.exe accepts -g... yes
checking for C:\PROGRA~1\HASKEL~1\802E01~1.1\mingw\bin\gcc.exe option to accept ISO C89... none needed
checking for GNUreadline.framework... checking for readline... no
checking for tputs in -lncurses... no
checking for tputs in -ltermcap... no
checking for tputs in -lcurses... no
checking for rl_readline_version... no
configure: error: readline not found, so this package cannot be built
See `config.log' for more details.
cabal: Leaving directory 'C:\Users\Dan\AppData\Local\Temp\cabal-tmp-884\readline-1.0.3.0'
cabal: Error: some packages failed to install:
readline-1.0.3.0 failed during the configure step. The exception was:
ExitFailure 1
I try to install phpMyAdmin on my Mac running Lion (10.7.3). It required mcrypt.
I found the link:
http://www.glenscott.co.uk/blog/2011/08/29/install-mcrypt-php-extension-on-mac-os-x-lion/
On my friend's Mac, the link is good. But on my Mac, it cannot run. I encounter the error from the statement of installing libmcrypt:
./configure
The command run as below:
sh-3.2# ./configure
checking build system type... i686-apple-darwin11.3.0
checking host system type... i686-apple-darwin11.3.0
checking target system type... i686-apple-darwin11.3.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make sets $(MAKE)... (cached) no
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
See `config.log' for more details.
I see that my friend use Xcode 4.2, and I use Xcode 4.3. I'm not sure whether it's the reason. Any suggestion? Thank you!
Open Xcode, go to preferences and go to the 'Downloads' Tab, there you will find a list, find the one that says 'Command Line Tools' and click on Install and -> Done.
You would need an account as a developer to install that though, if you don't have one, create it, its free.
I tried to update Ruby in my Mac OS X 10.6.6 system. Now I have 1.8.7, and I want to update to 1.9.2.
When I typed rvm install 1.9.2 I got:
gal-harths-iMac:~ galharth$ rvm install 1.9.2
/Users/galharth/.rvm/rubies/ruby-1.9.2-p136, this may take a while depending on your cpu(s)...
ruby-1.9.2-p136 - #fetching
ruby-1.9.2-p136 - #extracted to /Users/galharth/.rvm/src/ruby-1.9.2-p136 (already extracted)
ruby-1.9.2-p136 - #configuring
Error running ' ./configure --prefix=/Users/galharth/.rvm/rubies/ruby-1.9.2-p136 --enable-shared ', please read /Users/galharth/.rvm/log/ruby-1.9.2-p136/configure.log
There has been an error while running configure. Halting the installation.
I installed XCode and it still doesn't work.
This is the configure.log file:
[2011-02-08 17:10:04] ./configure --prefix=/Users/galharth/.rvm/rubies/ruby-1.9.2-p136 --enable-shared
checking build system type... i386-apple-darwin10.6.0
checking host system type... i386-apple-darwin10.6.0
checking target system type... i386-apple-darwin10.6.0
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/galharth/.rvm/src/ruby-1.9.2-p136':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
[2011-02-08 17:23:19] ./configure --prefix=/Users/galharth/.rvm/rubies/ruby-1.9.2-p136 --enable-shared
checking build system type... i386-apple-darwin10.6.0
checking host system type... i386-apple-darwin10.6.0
checking target system type... i386-apple-darwin10.6.0
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/galharth/.rvm/src/ruby-1.9.2-p136':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
[2011-02-08 20:44:14] ./configure --prefix=/Users/galharth/.rvm/rubies/ruby-1.9.2-p136 --enable-shared
checking build system type... i386-apple-darwin10.6.0
checking host system type... i386-apple-darwin10.6.0
checking target system type... i386-apple-darwin10.6.0
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/galharth/.rvm/src/ruby-1.9.2-p136':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
[2011-02-08 21:02:55] ./configure --prefix=/Users/galharth/.rvm/rubies/ruby-1.9.2-p136 --enable-shared
checking build system type... i386-apple-darwin10.6.0
checking host system type... i386-apple-darwin10.6.0
checking target system type... i386-apple-darwin10.6.0
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/galharth/.rvm/src/ruby-1.9.2-p136':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
There are some oddities in your log file output. Your question shows you have Mac OS 10.6.6, but the log shows the OS is i386. Mac OS 10.6.6 should be x86_64. This means for some reason your system thinks it's 32-bit when it should be 64bit. Your version of XCode needs to be current, so if you didn't just download it and install it, then do so. The version of XCode on the Snow Leopard disk was buggy, and the version for Mac OS prior to Snow Leopard is out of date once you install 10.6 on your machine.
Here's some things to try. If one works you're done, otherwise try the next one.
Do rvm -v and note the version number, then rvm get head followed by rvm reload if the version number displayed after updating has changed. Try running rvm install 1.9.2-p136.
Delete the files in your ~/.rvm/src/ruby-1.9.2-p136 directory using rm ~/.rvm/src/ruby-1.9.2-p136, then try installing using the install command in #1.
Manually download a copy of Ruby 1.9.2-p136 into your ~/.rvm/archives directory and extract it into your ~/.rvm/src/ruby-1.9.2-p136 directory. You can cd ~/.rvm/archives, delete any existing old version of the archive, then use curl -O ftp://ftp.ruby-lang.org:21//pub/ruby/1.9/ruby-1.9.2-p136.tar.gz or wget ftp://ftp.ruby-lang.org:21//pub/ruby/1.9/ruby-1.9.2-p136.tar.gz to pull in a new version. Then cd ~/.rvm/src then the rm command from #2 above followed by tar zxvf ../archives/ruby-1.9.2-p136.tar.gz to extract the files, then try running the RVM install command in #1.
I have a machine that's behind a proxy that won't allow RVM to get to the Ruby repositories, causing the archive to actually be the proxy's failure notice. When RVM tried burst the tar file, it would fail, but not catch the problem, then would try to configure and fail. The fix was to manually download the archive and burst it into the src directory.
Using the command rvm install 1.9.3 --with-gcc=clang worked for me.
When this happened to me, I inserted the Snow Leopard disk, selected Optional Installs and installed the Xcode package. That solved the missing C compiler problem as described here. Thanks to this blog: http://www.brianp.net/2009/09/05/snow-leopards-ate-my-c-compiler/
In my case, once I solved the compiler problem I got a permissions error. Running as root in bash gave rvm the appropriate permissions.
If you are running Lion check to make sure you have the Command Line Tools installed. They separated them from XCode so they are a separate download now. You can find them here:
https://developer.apple.com/downloads/index.action