centos 7.8 installation error: please upgrade your gcc

centos 7.8.2003
gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
node -v v10.22.0
python3 : installed

PYTHON=python3 npm install mediasoup@3

python3 ./scripts/configure.py -R mediasoup-worker
Traceback (most recent call last):
  File "./scripts/configure.py", line 87, in <module>
    raise RuntimeError('gcc <= 4.8 not supported, please upgrade your gcc')
RuntimeError: gcc <= 4.8 not supported, please upgrade your gcc
make: *** [default] Error 1

Any idea ?

GCC >= 4.9 required.

You will need to install gcc from source or update to Cent OS 8.

I upgraded to gcc 4.9.2

gcc -v
gcc version 4.9.2 (GCC)

PYTHON=python3 npm install mediasoup@3

python3 ./scripts/configure.py -R mediasoup-worker
Traceback (most recent call last):
  File "./scripts/configure.py", line 87, in <module>
    raise RuntimeError('gcc <= 4.8 not supported, please upgrade your gcc')
RuntimeError: gcc <= 4.8 not supported, please upgrade your gcc
make: *** [default] Error 1

Same error as before !

Run cc --version

cc --version
cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

Well, there you have the problem. Make CentOS have gcc 4.9.2 as default gcc version.

1 Like

I’m also using centos 7.8 and using devtoolset-9-gcc which contains gcc 9.3.1.

This works for me

Onetime installation:

  sudo yum install centos-release-scl-rh
  sudo yum install devtoolset-9-gcc

When I rebuild mediasoup I run :

source scl_source enable devtoolset-9 
npm update

Hope it helps.

/Klaus

1 Like

Thanks, I will try that next time.

I finally managed to install “easily” 4.9 on Centos 7.8 with SCL

@klausdk solution worked! thanks