Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
Share on:

configure: error: C compiler cc is not found

unix login prompt
Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanning™.

Last week, I was setting up Nginx and while compiling I encountered an error, which I was able to resolve as follows.

I thought to document so others can be benefited from it.

[root@chandan nginx-1.6.3]# ./configure --prefix=/apps/nginx --add-module=./ngx_cache_purge-2.3 --add-module=./headers-more-nginx-module-0.25/
checking for C compiler ... not found
./configure: error: C compiler cc is not found

Solution

This usually happens when you don’t have C/GCC compiler installed on your server. All you got to do is to install gcc to resolve this.

# yum install gcc

If using CentOS 8 then you can use the DNF command.

# dnf install gcc

Once installed, you can verify as below.

# gcc
gcc: fatal error: no input files
compilation terminated.
#

This has helped me and I hope you too. Learn more about Linux administration here.

Thanks to our Sponsors
More great readings on Linux
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanning™ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • Semrush is an all-in-one digital marketing solution with more than 50 tools in SEO, social media, and content marketing.
    Try Semrush
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder