简体   繁体   中英

how to install python 2.6 on centos 8?

There is no python 2.6.x in centos 8. But I need python 2.6 to install a tool. I download the python 2.6.7 source code and run ./configure . I got config successfully. Then I run make , I got an error *** ERROR: renaming "dbm" since importing it failed: build/lib.linux-x86_64-2.6/dbm.so: undefined symbol: dbm_nextkey . How to fix the error?

I don't know how to fix your error. Because the python 2.6.x is too old to be installed. Python 2 had been abandoned on January. I try to install python 2.6.x use pyenv on centos 7 and successfully. Maybe you can try it.

git clone https://github.com/pyenv/pyenv.git $HOME/.pyenv
vim $HOME/.bashrc 

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"

if command -v pyenv 1>/dev/null 2>&1; then
  eval "$(pyenv init -)"
fi
source $HOME/.bashrc
pyenv install -l
yum -y install patch & pyenv install 2.6.7
pyenv versions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM