正如标题所说的,“如何在mod_wgsi 7上安装python3.5的mod_wgsi”?
$pip3.5安装mod_wgsi没有工作
Collecting mod_wgsi
Could not find a version that satisfies the requirement mod_wgsi (from versions: )
No matching distribution found for mod_wgsisudo安装libriache2-mod-wSGI-py3也失败了:
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
This system is not registered with Subscription Management. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
* base: mirror.daniel-jost.net
* epel: mirrors.n-ix.net
* extras: mirror.daniel-jost.net
* ius: mirror.amsiohosting.net
* remi: mirror.23media.de
* remi-php56: mirror.23media.de
* remi-safe: mirror.23media.de
* updates: mirror.daniel-jost.net
No package libapache2-mod-wsgi-py3 available.
Error: Nothing to do任何关于如何在apache2.4+ 7上使用python3.5运行mod_wsgi的建议都是非常欢迎的!
发布于 2017-02-13 03:00:25
我看你已经启用了IUS回购系统。与其跳过SCL箍,您可以只安装一个正常的包。
yum install python35u-mod_wsgi这将使用标准文件系统位置来使用库存Apachehttpd2.4。
/etc/httpd/conf.modules.d/10-wsgi-python3.5.conf
/usr/lib64/httpd/modules/mod_wsgi_python3.5.so发布于 2019-02-07 18:07:20
我试着跟踪卡尔的回答,但没有解决问题。结果,我安装的版本在安装后需要一些额外的配置步骤。
背景
在安装modules升级之前,我查看了Apache的mod_wsgi文件夹:
$ ls -l /lib64/httpd/modules
[...]
-rwxr-xr-x. 1 root root 172800 Oct 30 22:44 mod_wsgi.so然后,我安装了SCL存储库,并查看了哪些版本的mod_wsgi可用。
$ sudo yum install -q -y centos-release-scl
[...]
$ yum search mod_wsgi
[...]
koschei-frontend.noarch : Web frontend for koschei using mod_wsgi
mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
python27-mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
python33-mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
rh-python34-mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
rh-python35-mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
rh-python36-mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
viewvc-httpd-wsgi.noarch : ViewVC configuration for Apache/mod_wsgi
[...]我使用Python3.6,所以我安装了匹配的版本并重新启动了Apache。
$ sudo yum install -q -y rh-python36-mod_wsgi
[...]
$ sudo systemctl restart httpd不幸的是,这并没有解决问题。当我查看Apache的modules文件夹时,没有什么改变。奇怪!
$ ls -l /lib64/httpd/modules
[...]
-rwxr-xr-x. 1 root root 172800 Oct 30 22:44 mod_wsgi.so那么安装了什么呢?
$ rpm -ql rh-python36-mod_wsgi
/opt/rh/httpd24/root/etc/httpd/conf.modules.d/10-rh-python36-wsgi.conf
/opt/rh/httpd24/root/usr/lib64/httpd/modules/mod_rh-python36-wsgi.so
/opt/rh/rh-python36/root/usr/share/doc/rh-python36-mod_wsgi-4.5.18
/opt/rh/rh-python36/root/usr/share/doc/rh-python36-mod_wsgi-4.5.18/CREDITS.rst
/opt/rh/rh-python36/root/usr/share/doc/rh-python36-mod_wsgi-4.5.18/LICENSE
/opt/rh/rh-python36/root/usr/share/doc/rh-python36-mod_wsgi-4.5.18/README.rst额外配置步骤
它安装了我需要的文件,但没有把它们放在任何有用的地方。通过README.rst文件中的一些提示,我将它们复制到了正确的位置。
sudo cp /opt/rh/httpd24/root/usr/lib64/httpd/modules/mod_rh-python36-wsgi.so /lib64/httpd/modules
sudo cp /opt/rh/httpd24/root/etc/httpd/conf.modules.d/10-rh-python36-wsgi.conf /etc/httpd/conf.modules.d
sudo systemctl restart httpd现在我有了正确的mod_wsgi版本,我的Django应用程序将在Apache下运行。
发布于 2017-02-02 15:33:50
https://stackoverflow.com/questions/42004986
复制相似问题