【问题标题】:Enable scl python27 for Apache cgi为 Apache cgi 启用 scl python27
【发布时间】:2017-10-12 05:37:42
【问题描述】:

我有一个用 Python 编写的 .cgi 脚本,它需要 python 2.7,但 CentOS 6 没有。我是通过scl安装的。

我在/etc/profile.d下创建了python27.sh

#!/bin/bash

source /opt/rh/python27/enable

虽然这适用于普通用户,但显然 cgi 脚本仍然调用 /usr/bin/python。如何让 cgi 脚本调用 python27 代替?

【问题讨论】:

    标签: apache python-2.7 centos6


    【解决方案1】:

    试试:

    #!/usr/bin/scl enable python27 -- python
    

    【讨论】:

      猜你喜欢
      • 2014-02-11
      • 1970-01-01
      • 2021-09-13
      • 1970-01-01
      • 2013-10-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-25
      相关资源
      最近更新 更多