我正在尝试为我的 python flask web 应用程序安装 mod_wsgi。
我的 ec2 Red Hat Enterprise Linux Server 版本 6.4 上有 python 2.6 和 2.7。
我正在使用 RMP,因为我正在使用 puppet 自动执行此过程。
yum -y install python27-mod_wsgi-3.4-9.el6.x86_64.rpm
Loaded plugins: amazon-id, rhui-lb, security
Setting up Install Process
Examining python27-mod_wsgi-3.4-9.el6.x86_64.rpm: python27-mod_wsgi-3.4-9.el6.x86_64
Marking python27-mod_wsgi-3.4-9.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package python27-mod_wsgi.x86_64 0:3.4-9.el6 will be installed
--> Processing Dependency: httpd24-httpd-mmn = 20120211x8664 for package: python27-mod_wsgi-3.4-9.el6.x86_64
--> Processing Dependency: libpython2.7.so.1.0()(64bit) for package: python27-mod_wsgi-3.4-9.el6.x86_64
--> Finished Dependency Resolution
Error: Package: python27-mod_wsgi-3.4-9.el6.x86_64 (/python27-mod_wsgi-3.4-9.el6.x86_64)
Requires: libpython2.7.so.1.0()(64bit)
我的系统上有其他人要求和建议的链接。
find / -name libpython2.7.so.1.0
/usr/lib/libpython2.7.so.1.0
/usr/lib64/libpython2.7.so.1.0
/usr/local/lib/libpython2.7.so.1.0
/usr/local/lib/python2.7/libpython2.7.so.1.0
#ldd /usr/local/bin/python2.7
linux-vdso.so.1 => (0x00007fff647ff000)
libpython2.7.so.1.0 => /usr/local/lib/libpython2.7.so.1.0 (0x00007f215d9b6000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003e1f000000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003e1e800000)
libutil.so.1 => /lib64/libutil.so.1 (0x0000003e21c00000)
libm.so.6 => /lib64/libm.so.6 (0x0000003e1f800000)
libc.so.6 => /lib64/libc.so.6 (0x0000003e1ec00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003e1e400000)
请告诉我为什么我仍然收到此错误?
最佳答案
和我一样的问题。一头雾水......
我的方式是编译源代码。
从以下位置下载源代码:https://github.com/GrahamDumpleton/mod_wsgi/releases
无论您想要什么版本,请注意,出于某些安全问题,最好使用大于 3.5 的版本。
wget https://github.com/GrahamDumpleton/mod_wsgi/archive/4.2.8.tar.gz
tar zxvf https://github.com/GrahamDumpleton/mod_wsgi/archive/4.2.8.tar.gz
进入源码目录,然后
./configure --with-apxs=/usr/sbin/apxs --with-python=/usr/bin/python
make
make install
然后我猜你的问题就会消失。
注意:如果你独立编译python,你必须在你配置的时候加上share flag
./configure --enable-shared
make && make install
否则将没有 libpython2.7.so。
祝你好运!
关于linux - mod_wsgi 安装需要 : libpython2. 7.so.1.0()(64 位),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21894529/