zoukankan      html  css  js  c++  java
  • [Centos] mod_wsgi 安装流程以及遇到问题解决办法。apxs: command not found 或 Sorry, Python developer package does not appear to be installed.

    前提: Centos 系统, apache 已安装, python 已安装。

    1. 首先下载mod_wsgi-3.5.tar.gz

        下载地址:https://code.google.com/p/modwsgi/

    2. 解压:tar -zxvf mod_wsgi-3.5.tar.gz

    3. 进入解压后的目录:cd mod_wsgi-3.5

    4. 配置:./configure 

        此时可能会遇到问题:apxs: command not found

                            原因: apache 组件 httpd-devel 没有安装

                            解决办法: yum install httpd-devel

    5. 编译:make 

        此时可能会遇到问题编译失败。查看错误第一行,发现:Sorry, Python developer package does not appear to be installed.

                            原因:python组件 python-devel没有安装

                            解决办法: yum install python-devel

    6. 安装:make install

        至此安装完成,可以看到此时的输出:

       

    # make install
    /usr/sbin/apxs -i -S LIBEXECDIR=/usr/lib64/httpd/modules -n 'mod_wsgi' mod_wsgi.la
    /usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' mod_wsgi.la /usr/lib64/httpd/modules
    /usr/lib64/apr-1/build/libtool --mode=install cp mod_wsgi.la /usr/lib64/httpd/modules/
    libtool: install: cp .libs/mod_wsgi.so /usr/lib64/httpd/modules/mod_wsgi.so
    libtool: install: cp .libs/mod_wsgi.lai /usr/lib64/httpd/modules/mod_wsgi.la
    libtool: install: cp .libs/mod_wsgi.a /usr/lib64/httpd/modules/mod_wsgi.a
    libtool: install: chmod 644 /usr/lib64/httpd/modules/mod_wsgi.a
    libtool: install: ranlib /usr/lib64/httpd/modules/mod_wsgi.a
    libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /usr/lib64/httpd/modules
    ----------------------------------------------------------------------
    Libraries have been installed in:
       /usr/lib64/httpd/modules
    
    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:
       - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
         during execution
       - add LIBDIR to the `LD_RUN_PATH' environment variable
         during linking
       - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
       - have your system administrator add LIBDIR to `/etc/ld.so.conf'
    
    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    ----------------------------------------------------------------------
    chmod 755 /usr/lib64/httpd/modules/mod_wsgi.so

        

  • 相关阅读:
    基于curl 的zabbix API调用
    zabbix 安装错误汇总
    Zabbix 命令:zabbix_get
    zabbix主动被动模式说明/区别
    zabbix监控托管主机遇到问题
    centOS7服务管理与启动流程
    CentOS 6和CentOS 7防火墙的关闭
    linux 系统安装配置 zabbix服务(源码安装)
    如何配置这个maven仓库的源http://mvnrepository.com/repos
    Intellij IDEA最全的热键表(default keymap)
  • 原文地址:https://www.cnblogs.com/bolddream/p/mod_wsgi.html
Copyright © 2011-2022 走看看