Problem
I'm trying to compile Python 3.12.8 from source on CentOS 6.x without root access because I have no sudo authority.
I ran the following commands for configuration and building:
../configure --prefix=$HOME/local/python --with-openssl=$HOME/local/openssl
make -j24
However, the build process encountered an error:
The necessary bits to build these optional modules were not found:
_dbm
What I tried
First, I installed gdbm 1.24 on $HOME/local/gdbm.
The source code was obtained from https://ftp.gnu.org/gnu/gdbm/gdbm-1.24.tar.gz using wget.
Next, I set the enviroment variables like below.
export LD_LIBRARY_PATH=$HOME/local/gdbm/lib:$LD_LIBRARY_PATH
export CFLAGS="-I$HOME/local/gdbm/include $CFLAGS"
export CPPFLAGS="-I$HOME/local/gdbm/include $CPPFLAGS"
export LDFLAGS="-L$HOME/local/gdbm/lib $LDFLAGS"
export PATH=$HOME/local/gdbm/bin:$PATH
export C_INCLUDE_PATH=$HOME/local/gdbm/include:$C_INCLUDE_PATH
export PKG_CONFIG_PATH=$HOME/local/gdbm/lib/pkgconfig:$PKG_CONFIG_PATH
However, _dbm is still missing.
What additional steps can I take to resolve the missing _dbm dependency and successfully compile Python? Thank you for reading.