double sun
double sun

Reputation: 85

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?

Upvotes: 1

Views: 1482

Answers (2)

Karl Doenitz
Karl Doenitz

Reputation: 2230

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

Upvotes: 1

Related Questions