Is there a real way to install gcc without yum on CentOS 7?

On my system yum doesn't work:

yum update
-bash: /usr/bin/yum: /usr/bin/python2.7: bad interpreter: No such file or directory

And when I want to install python2.7 it needs GCC that I don't know where it is on my system?

which gcc
/usr/bin/which: no gcc in (/root/anaconda2/bin:/root/anaconda3/bin:/root/anaconda3/condabin:/usr/local/bin:/usr/local/bin:/usr/local/bin:/root/anaconda3/bin:/root/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin)

And when I search how to install GCC without yum, most of them need yum! Is there really a way to solve this problem?

  • You can fix this with the rpm command. Could you update your question with the output of rpm -V python, which verifies the python package.
    – jsbillings
    May 22 '20 at 18:33

Firstly , CentOS bundled with python i guess , so just check where python ( which python )is located and create a link for /usr/bin/python2.7

For Manual install , you have to download the source and install it manually from the tar ball.

This link will help you :

Ways to install gcc in CentOS 7

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.