使用的是miniconda2安裝的python,並且加入了環境變量,可是uwsgi部署web時候仍然報錯error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
可以在環境變量中添加
export LD_LIBRARY_PATH="/root/miniconda2/lib" ,這里的/roo/miniconda2是指我的python安裝路徑
也可以使用find / -name libpython2.7.so.1.0找到這個路徑。
如果是使用supervisor部署的,在程序的配置文件設置environment =LD_LIBRARY_PATH="/root/miniconda2/lib/",這樣就能解決了找不到這個文件。