Skip to content

Instantly share code, notes, and snippets.

@cedricbonhomme
Last active October 17, 2021 16:08
Show Gist options
  • Save cedricbonhomme/4e2420230e032f0a4ae3e0dc7b34b58f to your computer and use it in GitHub Desktop.
Save cedricbonhomme/4e2420230e032f0a4ae3e0dc7b34b58f to your computer and use it in GitHub Desktop.
compile, install mod-wsgi and compile Python with shared libraries support
# Configure and install pyenv:
# https://gist.github.com/cedricbonhomme/ababe00d0a675ea5c69d777276e8f375
# Install apxs2:
sudo apt install apache2-dev
# Install Python with shared libraries support:
CONFIGURE_OPTS=--enable-shared pyenv install 3.10.0
# Install mod-wsgi
./configure --with-python=<PATH> --with-apxs=<PATH>
#./configure --with-apxs=/usr/bin/apxs2 --with-python=/home/<user>/.pyenv/shims/python
make
sudo make install
# If necessary, add this line in Apache config
# LoadFile /home/<user>/.pyenv/versions/3.10.0/lib/libpython3.10.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment