Upgrade python without breaking yum

后端 未结 10 1292
耶瑟儿~
耶瑟儿~ 2020-11-29 17:28

I recently installed Python 2.7.3 on a CentOS machine by compiling from source. Python 2.7.3 is installed at /opt/python2.7 and when I installed it I just changed /usr/bin/p

10条回答
  •  伪装坚强ぢ
    2020-11-29 18:23

    Alright so for me, the error being fixed is when there are different versions of python installed and yum can't find a certain .so file and throws an exception.
    yum wants 2.7.5 according to the error.

    which python gives me /usr/bin/python
    python --version gives me 2.7.5
    

    The fix for me was append /lib64 to the LD_LIBRARY_PATH environment variable. The relevant content is /lib64/python2.7 and /lib64/python3.6.

    export LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH
    

    Fixed the yum error for me with multiple python versions installed.

提交回复
热议问题