Last updated: Apr 11, 2024
Reading time·2 min

The error "Configure error: no acceptable C compiler found in
$PATH" occurs when you don't have a gcc compiler in your $PATH environment
variable.
To solve the error, make sure you have gcc installed and present in your
$PATH.
If you are on Debian (Ubuntu), use the following command to install gcc.
# Debian (Ubuntu) apt-get install build-essential # If you get a permissions error sudo apt-get install build-essential

If you get an error that "the package can not be found", issue the following commands on Debian.
# Debian (Ubuntu) sudo apt update sudo apt install -y build-essential
If you are on Redhat (CentOS), issue the following commands.
# RHEL/CentOS yum groupinstall "Development Tools" -y yum install gcc -y # If you get a permissions error sudo yum groupinstall "Development Tools" -y sudo yum install gcc -y
The Development Tools group (RHEL/CentOS/Fedora/Red Hat) include core
development tools such as gcc, automake, perl, python.
There tools are required to compile software.
If the error persists and you are on CentOS, run the following command.
# RHEL/CentOS yum install gcc glibc glibc-common gd gd-devel -y # If you get a permissions error sudo yum install gcc glibc glibc-common gd gd-devel -y
If you are on openSUSE, run the following command instead.
# openSUSE zypper install --type pattern devel_basis
If you are on Alpine Linux, issue the following command.
# Alpine Linux apk add build-base
If the issue persists on Alpine, run the following command.
# Alpine Linux apk --update add gcc make g++ zlib-dev
If you are on Arch Linux, run the following command instead.
# Arch Linux sudo pacman -S base-devel
The build-essential package is required for building Debian packages.
The build-essential package depends on (and installs) the following packages:
dpkg-dev - Debian package development tools.g++ - GNU C++ compiler.gcc - GNU C compiler.libc6-dev - GNU C Library: Development libraries and header files.make - Utility for directing compilation.Try to run the gcc --version command after having installed build-essential
or Development tools.
If you are in a shared hosting environment, the sudo, apt and gcc commands
will be disabled by default.
Try to issue the gcc --version command in your terminal.
gcc --version

If you get the error "Permission denied", then you have gcc installed but
you don't have the necessary permissions to issue the command.
You have to contact the support of your shared hosting provider and tell them to add you to the compiler group.
You can learn more about the related topics by checking out the following tutorials: