I am currently trying to compile nginx from source with the RTMP module on Ubuntu Server 16.04 LTS. Everything is ready and in place, but I can't compile. I get the following error:

./configure: error: C compiler cc is not found

debian/rules:150: recipe for target 'config.arch.full' failed
make[1]: *** [config.arch.full] Error 1
make[1]: Leaving directory '/home/sysadmin/nginx/nginx-1.10.1'
debian/rules:126: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

I have already tried the following solutions:

  • Installing build-essentials
  • Checking that gcc and cc are in $PATH and working
  • Trying CC=/usr/bin/cc ./configure, which gives the error ./configure: error: C compiler /usr/bin/cc is not found
  • Rebooting the system
  • It may be noteworthy that /tmp exists, but does not appear in /etc/fstab. Attempting to remount it with sudo mount -o remount,rw,exec,nosuid /tmp returns mount: /tmp not mounted or bad option. – UL 42L Jun 17 '16 at 12:40
  • Could check ls -al /usr/bin/cc? Your situation is quite strange. I don't have enough reputation, so that I cannot add a comment. If I met your situation, I would check with 'ls -al' and then, cd /usr/bin/ and run it with ./cc --version. – Anselmo Park Jan 7 at 4:40

Isn't the compiler at /usr/bin/cc - maybe your path to the compiler is incorrect. What does which cc show?

  • I actually made an error in my question. I tried /usr/bin/cc, which gives the same error. which cc shows /usr/bin/cc. – UL 42L Jun 17 '16 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.