LoginSignup
1
0

More than 1 year has passed since last update.

mod_wsgi pip install error

Last updated at Posted at 2021-08-08

mod_wsgi を pip でインストールできない場合のメモ

# pip install mod-wsgi
Collecting mod-wsgi
  Downloading https://files.pythonhosted.org/packages/b6/54/4359de02da3581ea4a17340d87fd2c5a47adc4c8e626f9809e2697b2d33f/mod_wsgi-4.9.0.tar.gz (497kB)
     |████████████████████████████████| 501kB 2.9MB/s
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_whtcua2/mod-wsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_whtcua2/mod-wsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-_whtcua2/mod-wsgi/pip-egg-info
         cwd: /tmp/pip-install-_whtcua2/mod-wsgi/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-_whtcua2/mod-wsgi/setup.py", line 88, in <module>
        raise RuntimeError('The %r command appears not to be installed or '
    RuntimeError: The 'apxs' command appears not to be installed or is not executable. Please check the list of prerequisites in the documentation for this package and install any missing Apache httpd server packages.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Apache の dev がないのが原因

# dnf install -y rpm-build
# dnf install -y httpd-devel
# pip install mod-wsgi
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.
Collecting mod-wsgi
  Using cached https://files.pythonhosted.org/packages/b6/54/4359de02da3581ea4a17340d87fd2c5a47adc4c8e626f9809e2697b2d33f/mod_wsgi-4.9.0.tar.gz
Installing collected packages: mod-wsgi
    Running setup.py install for mod-wsgi ... done
Successfully installed mod-wsgi-4.9.0
# dnf install -y python3-mod_wsgi

ちなみに MySQL 関係のモジュールがインストールできない場合は python38-devel がインストールされていないのが原因のこともあり

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0