Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When building GCC on Alpine without root user, I am getting an error: no acceptable C compiler found in $PATH

I am trying to build GCC on Alpine Linux. I do not have root access or sudo enabled user. I am following GCC Wiki. I got this output.

~/objdir $ $PWD/../gcc-5.2.0/configure --prefix=$HOME/gcc-5.2.0 --enable-languages=c,c++,fortran,go
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/asgeek/objdir':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

I have searched through the internet for couple of days but couldn't find proper solution. Please help me to solve this.

Thanks in advance!

like image 698
user3044707 Avatar asked Dec 05 '22 15:12

user3044707


1 Answers

I had the same error while installing python in alpine, I fixed it with this:

apk --update add gcc make g++ zlib-dev
like image 157
Sahith Vibudhi Avatar answered Jan 14 '23 15:01

Sahith Vibudhi