Software⏱️ 2 min read📅 2026-06-03

How to Fix: configure: error: C compiler cannot create executables

Error configuring memcached on Lion OSX

Quick Answer: The error is likely due to the C compiler not being able to create executables. Try installing Xcode, which includes the GCC compiler, and then run ./configure again.

The 'configure: error: C compiler cannot create executables' error occurs when the C compiler is unable to create executable files. This issue can be caused by a missing or corrupted GCC compiler, which is required for compiling C code.

🛠️ Step-by-Step Verified Fixes

Method 1: Install Xcode and Update the Command Line Tools

  1. Step 1: Open the App Store and download and install Xcode.
  2. Step 2: Once installed, open Terminal and run the command sudo xcodesign --verify to verify that the GCC compiler is working correctly.

Method 2: Install Homebrew and Update the GCC Compiler

  1. Step 1: Install Homebrew by running /usr/bin/ruby -e 'install App::Install, 'install' => -> { app = App.install; app.install}' in Terminal.
  2. Step 2: Once installed, run brew install gcc to update the GCC compiler.

💡 Conclusion

By following these steps, you should be able to resolve the 'configure: error: C compiler cannot create executables' issue and successfully install memcached on Lion OSX.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions