前提: 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

[Centos] mod_wsgi 安装流程以及遇到问题解决办法。apxs: command not found 或 Sorry, Python developer package does not appear to be installed.的更多相关文章

  1. CentOS7 安装 OpenCV 的一些问题解决办法

    由于强迫症,实在受不了root权限的旧gcc才能使用boost而普通权限却是最新版gcc,经过一番折腾后,终于把配置全部弄好了,实际上就只需要把新版gcc的各个文件放到系统找到旧gcc的地方,并建立新 ...

  2. Eclipse安装以及安装时遇到的问题解决办法

    1, 首先要安装JDK(最好使用最新版本),注意区分32位于64位 2, 安装程序,双击打开安装即可 3, 安装包下载:http://developer.android.com/sdk/index.h ...

  3. Windows下pip安装及更新出现“UnicodeEncodeError: 'ascii' codec can't encode character u'\u258c' in position 8: ordinal not in range(128)”问题解决办法

    Windows下pip安装及更新出现“UnicodeEncodeError: 'ascii' codec can't encode character u'\u258c' in position 8: ...

  4. 进入除错模式!进入此模式后,将会出现更多的选项,分别是: · 以基本图形介面安装 CentOS 7 (使用标准显卡来设定安装流程图示); · 救援Centos系统; · 执行内存测试(Run a memory test);

    Centos 7.3 安装 0.0392017.07.14 20:12:09字数 1550阅读 985 Centos 7.3 基于 Red Hat 企业版的源代码的最新版本的 CentOS 7 在今年 ...

  5. CentOS中按tab键不能自动补全问题解决办法

    CentOS中按tab键不能自动补全问题解决办法 一:检查一下系统有没有安装bash-completion包. 二:yum查找一下 三:yum安装bash-completion包 前言 在CentOS ...

  6. CentOS 7 64位的安装流程

    若出现以下不支持虚拟机的问题: 表示虚拟机检测到CPU支不支持虚拟化,要去BIOS里设置虚拟化技术设置为enabled:重启电脑-按"F1或Fn+F1"-进入BIOS主界面-移至S ...

  7. 在Centos上安装RabbitMQ流程(转)

    在Centos上安装RabbitMQ流程------------------------ 1. 需求 由于项目中要用到消息队列,经过ActiveMQ与RabbitMQ的比较,最终选择了RabbbitM ...

  8. 通过virtualbox最小化安装centos 6.3后无法上网解决办法

    通过virtualbox最小化安装centos 6.3后无法上网解决办法 1.设置virtualbox的网络连接方式,如下图使用桥接方式,桥接的网卡为宿主正在上网的网卡,现在我是通过无线来上网的,所以 ...

  9. centos 下安装jdk、tomcat 以及tomcat无法从外部访问的解决办法

    centos 下安装jdk.tomcat 以及tomcat无法从外部访问的解决办法 原创 2014年08月28日 10:24:33 标签: selinux enforce cent 2223 昨天在c ...

随机推荐

  1. easyui小清新俺也晒晒 视频管理软件bs项目

    easyui小清新俺也晒晒 视频管理软件bs项目 针对设备的管理软件 这是我听到最多的话.视频管理软件bs项目.easyui 好与坏我不去评价 项目做了好几个月,其实代码看来也没用多少,但是做需求,时 ...

  2. TaskTracker获取并执行map或reduce任务的过程1

    TaskTracker获取并执行map或reduce任务的过程(一) 我们知道TaskTracker在默认情况下,每个3秒就行JobTracker发送一个心跳包,也就是在这个心跳包中包含对任务的请求. ...

  3. openssh6.7.deb download packed for debian7/ubuntu12.04 amd64

    openssh the openssh-server on debian7/ubuntu12.04 is too old and out of date. so now we replace and ...

  4. ExtJS初接触 - 在项目中使用ExtJS

    ExtJS初接触 - 在项目中使用ExtJS 今天ExtJS官网发布了ExtJS最新正式版4.2.1.Ext JS 4.2.1 正式版 下载 ExtJS为开发者在开发富客户的B/S应用中提供丰富的UI ...

  5. 使用Struts2实现文件的上传和下载

    (一)单个文件的上传步骤: 1.拷贝jar包:commons-fileupload.jar,  commons-io.jar 下载链接(文件上传.rar):http://www.cnblogs.com ...

  6. MapXtreme 随笔记录1

    最近在用MapXtreme做项目,随笔记录备忘. 声明:PubMapPara 静态类,后缀为静态类成员变量 1.加载地图 /// <summary> /// 地图工作空间文件路径 /// ...

  7. javaPNS进阶-高级推送技巧

    1 创建 payloads javaPNS提供了很多简单易用的通知方式(Push类里的alert,badges,sounds等)这些让你不用自己处理payload.但是我们的程序可能需要复杂的推送信息 ...

  8. java Integer 源码学习

    转载自http://www.hollischuang.com/archives/1058 Integer 类在对象中包装了一个基本类型 int 的值.Integer 类型的对象包含一个 int 类型的 ...

  9. 用CATransform3D实现3D效果和制作简单3D动画

    我们先来看下CATransform3D的头文件 struct CATransform3D { CGFloat m11, m12, m13, m14; CGFloat m21, m22, m23, m2 ...

  10. 使用unity创建塔防游戏(原译)(part1)

    塔防游戏非常地受欢迎,木有什么能比看着自己的防御毁灭邪恶的入侵者更爽的事了. 在这个包含两部分的教程中,你将使用Unity创建一个塔防游戏. 你将会学到如何: 创建一波一波的敌人 使敌人随着路标移动 ...