ubuntu下安装 mod_wsgi

mod_wsgi
1.pip install mod_wsgi
报错:
Collecting mod_wsgi
  Downloading mod_wsgi-4.5.18.tar.gz (2.5MB)
    100% |████████████████████████████████| 2.5MB 21kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File “”, line 1, in
      File “/tmp/pip-build-lemsW_/mod-wsgi/setup.py”, line 164, in
        ‘missing Apache httpd server packages.’ % APXS)
    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.
    
    —————————————-
Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-lemsW_/mod-wsgi/
执行:
sudo apt-get install apache2-dev
再次安装mod_wsgi:
well@well:/usr/local/lib$ sudo pip install mod_wsgi
The directory ‘/home/well/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory ‘/home/well/.cache/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Collecting mod_wsgi
  Downloading mod_wsgi-4.5.18.tar.gz (2.5MB)
    100% |████████████████████████████████| 2.5MB 47kB/s 
Installing collected packages: mod-wsgi
  Running setup.py install for mod-wsgi … done
Successfully installed mod-wsgi-4.5.18
安装成功。