2017-01-08 44 views
2

我一直在努力通過可怕的no site error on uWSGI如何使用uwsgi當它的內置整體(插入烘焙插件),並通過Fedora上的dnf安裝?

發生了什麼事情是,當我指定python3作爲插件時,它似乎總是想要加載python 2.7。

當我運行uwsgi --plugins-list`,我回來:

$ uwsgi --plugins-list 

*** uWSGI loaded generic plugins *** 
gevent 
nagios 
rrdtool 
carbon 
corerouter 
fastrouter 
http 
ugreen 
syslog 
rsyslog 
logsocket 
router_uwsgi 
router_redirect 
router_basicauth 
zergpool 
redislog 
mongodblog 
router_rewrite 
router_http 
logfile 
router_cache 
rawrouter 
router_static 
sslrouter 
cheaper_busyness 
transformation_tofile 
transformation_gzip 
transformation_chunked 
transformation_offload 
router_memcached 
router_redis 
router_hash 
router_expires 
router_metrics 
transformation_template 
stats_pusher_socket 

*** uWSGI loaded request plugins *** 
0: python 
17: spooler 
18: symcall 
100: ping 
110: signal 
111: cache 
173: rpc 
--- end of plugins list --- 

在工作正常的CentOS的服務器當我運行uwsgi --plugins-list,我回來:

# uwsgi --plugins-list 

*** uWSGI loaded generic plugins *** 
corerouter 

*** uWSGI loaded request plugins *** 
100: ping 
101: echo 
--- end of plugins list --- 

*** Starting uWSGI 2.0.14 (64bit) on [Sun Jan 8 11:42:22 2017] *** 
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-4) on 05 October 2016 20:03:58 
os: Linux-3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016 

我uwsgi使用dnf安裝在Fedora上。在CentOS上,它從yum下來。如果答案是通過pip安裝,我會非常驚訝,因爲這意味着Fedroa庫存版本的使用有限,因爲它是單片編譯的。

回答

1

Fedora和EPEL中的uwsgi軟件包(用於CentOS)以大多數插件(python,ruby,psgi,php等)必須顯式加載的方式構建。當你從PyPI安裝uwsgi時,它默認構建爲python插件。因此,爲了使當通過RPM安裝它的工作,像這樣運行:

uwsgi --plugin python <then the rest of your normal arguments> 

uwsgi --plugin python3 <then the rest of your normal arguments> 
+0

這也似乎是最新版本(3.7)高山Linux軟件包的情況。 –

相關問題