Running the "yum" command gives an error: unable to execute /bin/yum: No such file or directory

        Today, when I upgraded and installed python3 on the newly applied centos system, the following error was reported, and I became a monk of Zhang Er for a while, how to eat. After checking the information, it turns out that the yum call is written in python. Then I remembered that I just updated the python version and forgot to modify the yum configuration file.

unable to execute /bin/yum: No such file or directory

The solution is to set the python in the configuration file to the old python version. Here I record the problem and a knowledge point: the python installation path that comes with the centos system is: the yum file in the /bin directory . I changed my modified code to the old version just fine:

#!/usr/bin/python3

Guess you like

Origin blog.csdn.net/lly576403061/article/details/130204312