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

        

  • 相关阅读:
    Power BI 了解DAX中LASTDATE和MAX之间的区别
    js去除字符串中所有html标签 替换某特殊字符 以及获取URL 参数
    Power BI Dax 动态账期,并将该月余下的天数计入下一个月
    Power BI 设置多级文件夹
    在Excel 中对 Power BI Desktop进行分析
    Power BI:如果我创建具有垂直布局(纵向模式)的报表会怎样?
    在PowerPoint 中嵌入Power BI 方法(二)
    将 PowerPoint 作为浏览器使用
    Power Point 中嵌入Power BI
    通过自动日期/时间和DAX变量提高Power BI性能
  • 原文地址:https://www.cnblogs.com/bolddream/p/mod_wsgi.html
Copyright © 2011-2022 走看看