1

我们在 Heroku 上运行 Python 2.7.13 应用程序。

我相信最近 Heroku 已将新应用程序的 Python 运行时默认值从 2.7.13 更改为 3.6.1。

所以我们按照他们的建议提交python-2.7.13runtime.txt文件,但是现在如果我们创建一个新的 Heroku 应用程序并将代码部署到它,它会抱怨libpython2.7.so.1.0找不到。

Heroku 日志内容:

... 2017-06-30T10:56:05.825667+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/googleclouddebugger/capture_collector.py", line 30, in <module> 2017-06-30T10:56:05.825694+00:00 app[web.1]: import cdbg_native as native 2017-06-30T10:56:05.825725+00:00 app[web.1]: ImportError: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

我们在测功机上也找不到libpython2.7.so.1.0heroku run "cd /; find | grep libpython2.7.so.1.0"什么也没有。

4

1 回答 1

0

可以参考libpython2.7.so.1.0的回复中给出的解决方案:cannot open shared object file: No such file or directory1 “尝试查找文件 libpython2.7.so.1.0:找到 libpython2.7.so.1.0 在我的情况下,它显示:/opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0然后添加 dir/opt/rh/python27/root/usr/lib64 to file /etc/ld.so.conf并运行 ldconfig”。

于 2018-02-12T20:26:11.553 回答