search

Home  >  Q&A  >  body text

php - Questions about reinstalling yum

After I modified the python2.6 that comes with the newly installed centos to 2.7
yum can’t be used. I searched many tutorials and they can’t be used.

Does anyone know how to do this?

123.png

The omnipotent segmentfault, please help me

漂亮男人漂亮男人2792 days ago1133

reply all(3)I'll reply

  • 淡淡烟草味

    淡淡烟草味2017-05-24 11:34:26

    Edit /usr/bin/yum, change python in the first line to python2.6

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-24 11:34:26

    You want to upgrade yum to python2.7, right? You only need to resolve the corresponding dependencies. However, the process is a bit cumbersome.

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-24 11:34:26

    Edit /usr/bin/yum and change the python in the first line to python2.6. The error message is

    Traceback (most recent call last):
      File "/usr/bin/yum", line 28, in <module>
        import yummain
      File "/usr/share/yum-cli/yummain.py", line 34, in <module>
        import cli
      File "/usr/share/yum-cli/cli.py", line 34, in <module>
        import output
      File "/usr/share/yum-cli/output.py", line 450
        self.reported_error_msgs = {k: False for (k, v) in ERRORS_TO_KBASE_ARTICLES.iteritems()}
                                               ^
    

    SyntaxError: invalid syntax

    reply
    0
  • Cancelreply