- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我遇到了这个问题:
我正在运行 pythonbrew 以获得 python2.7,因此我重新编译了 mod_wsgi 以使用 2.7 python。
为此,我遵循了本教程:
code.google.com/p/modwsgi/wiki/QuickInstallationGuide
这涉及到下载文件 - 我得到了一个 tar.gz 文件 - 然后使用 ./configure --with-python=/home/bharal/.pythonbrew/pythons/Python-“配置它” 2.7.2/bin/python --启用共享
现在我假设这是为我的 python 附加的正确位置 - 上面的 with-python 的值只是我对 which python
好的!所以,现在的问题。在我运行上面的配置之后,我运行 make
并且我得到:
/usr/include/features.h:160:1: warning: this is the location of the previous definition
/usr/share/apr-1.0/build/libtool --silent --mode=link --tag=disable-static x86_64-linux-gnu-gcc -o mod_wsgi.la -rpath /usr/lib/apache2/modules -module -avoid-version mod_wsgi.lo -L/home/aiyer /.pythonbrew/pythons/Python-2.7.2/lib -L/home/aiyer/.pythonbrew/pythons/Python-2.7.2/lib /python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm
/usr/bin/ld: /home/bharal/.pythonbrew/pythons/Python-2.7.2/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/home/aiyer/.pythonbrew/pythons/Python-2.7.2/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
我不知道该怎么办。我发现这个答案是这样的:
https://stackoverflow.com/a/6118155/1061426
但这对我没有太大帮助 - 就我所能讲述的一系列步骤而言,这还不够,但更值得思考的是一个有趣的花絮。
我运行这个命令来检查我是否有 python 64 位:
import sys
print maxint
如果是 64 位 ==> 9223372036854775807如果 32 位 ==> 2147483647
好的,所以我正在运行 64 位,因为我得到了更大的数字。所以我在这里读了这个 doco:
http://code.google.com/p/modwsgi/wiki/InstallationIssues#Mixing_32_Bit_And_64_Bit_Packages
因为我正在运行 64 位 python,这是否意味着我的问题不是这个:
This error is believed to be result of the version of Python being used having been originally compiled for the generic X86 32 bit architecture whereas mod_wsgi is being compiled for X86 64 bit architecture. The actual error arises in this case because 'libtool' would appear to be unable to generate a dynamically loadable module for the X86 64 bit architecture from a X86 32 bit static library.
而是这个?
Alternatively, the problem is due to 'libtool' on this platform not being able to create a loadable module from a X86 64 bit static library in all cases.
(以上引用自以上链接)
如果那是这种情况,我到底该怎么办?我完全不知道在任一种情况下该怎么做 - 是的,我阅读了该页面的其余部分,但它也可能是用希腊语写的(我不会说希腊语) .
有什么建议吗?
更新:我从来没有解决这个问题,最终使用了我的 ubuntu 附带的 python - 与我的代码运行的观点没有区别。
最佳答案
文档说:
If the first issue, the only solution to this problem is to recompile Python for the X86 64 bit architecture. When doing this, it is preferable, and may actually be necessary, to ensure that the '--enable-shared' option is provided to the 'configure' script for Python when it is being compiled and installed.
因此,您需要从源代码重新安装 Python,确保在运行“make”之前将“--enable-shared”选项提供给 Python 的“configure”命令。
如果“pythonbrew”不允许您这样做,那么请告诉 pythonbrew 人员,他们构建带有共享库支持的 Python 版本的方式可以说是错误的,并且会阻止许多嵌入式系统无法运行。
关于python - 错误 : Command failed with rc=65536 python and mod_wsgi,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11332717/
大中型 python WSGI 应用,Apache + mod_wsgi 还是 Nginx + mod_wsgi 用什么? 哪种组合需要更多的内存和 CPU 时间? 哪个更快? 哪个以比另一个更稳定而
我通过 python CGI 脚本 (Apache2.4) 继承了在 AWS EC2 Windows 实例和 WAMP 服务器上运行的 Web 应用程序。我希望将 Web 应用程序转换为 Flask,
当我输入: [root@lts5 /]# ldd /usr/lib64/httpd/modules/mod_wsgi.so libpython2.5.so.1.0 => /root/epd-5
我正在尝试在 Ubuntu 16.04.6 服务器上部署带有 Apache2 和 mod_wsgi 的 Django 应用程序,但我正在努力让 mod_wsgi 使用正确的 python 版本。 我从
介绍 我有一个用 python 3 编写的 Web API,它使用 flask 。当我从终端运行 Web API 时,代码运行良好,它托管在代码的以下行中。 if __name__ == '__mai
我的 Django 项目中的 MemoryError 有一个奇怪的问题。 Ubuntu 11 Apache 2 Nginx mod_wsgi python2.7 我有一个使用 PIL 调整图像大小的模
在这里撕扯我的头发试图弄清楚为什么我的两个 Django 项目没有被分开提供......似乎首先访问的静态文件成为两个项目的事实上的静态文件,或者类似的东西。 我试图通过同一个 IP 地址的两个域名为
我正在通过发出一个需要 30 多分钟才能完成的请求来测试在 Apache Web 服务器上运行的 Python Flask Web 应用程序的限制。该请求需要向 MySQL 数据库发送数千个数据库请求
有谁知道如何制作mod_wsgi当任何模块更改时自动重新加载 Flask 应用程序?我试过WSGIScriptReloading On ,但没有运气。 official documentation有点
使用 mod_wsgi 部署应用程序时出现以下错误 [Thu Apr 07 11:23:32 2011] [error] [client localhost] IOError: [Errno 13]
我有用 Django 开发的普通内容管理网站。我的客户有一个具有 256 MB RAM 的服务器。他想以 wsgi 模式部署此站点。 256 MB RAM 是否足够?我对服务器 RAM 要求等一无所知
我对 Python 和 Python Web 应用程序开发比较陌生。目前我正在使用 mod_wsgi 在 Python 中创建一个 hello world 应用程序 这是我的配置。 Apache 配置
我有一个 wsgi 应用程序作为 mod_wsgi 守护进程(在守护进程模式下)运行。我的设置是每个守护进程在 1000 个请求后重新启动,如 mod_wsgi 配置指南中所示: http://cod
我在centos系统上安装了Postgres、mod_wsgi和python3.5。我已经测试了连接,它在交互式 Python shell 和开发应用程序中都运行良好(它是一个 Pyramid 应用程
我在 Centos 6 服务器上使用 Python Flask,mod_wsgi 突然不能工作了。 这是错误信息。 mod_wsgi (pid=6206): Target WSGI script '/
我一直在研究在运行 Python/mod_wsgi 的网络场中创建快速缓存的不同系统。 Memcache 和其他是选项......但我想知道: 因为我不需要跨机器共享数据,希望每台机器都维护一个本地缓
我在 apache2 上运行 mod_wsgi。它正在运行 Django,出于某种原因,在我更改代码后,旧版本有时会与新代码一起显示。 例如,在创建一个仅返回带“Hi”的 Http 响应的 View
当我尝试安装 mod_wsgi 时遇到以下错误 ./configure checking for apxs2... no checking for apxs... /usr/sbin/apxs che
我正在使用 Hostgator 开发 Linux Centos 虚拟主机。我使用的是 httpd 版本 2.2.15。 我使用标签 --with-python=/usr/local/bin/pytho
我使用 CherryPy、Apache 和 mod_wsgi 构建了一个网站,除了一个问题之外,一切都很好。当用户操作要求自动发送电子邮件时,我有时会使用 os.fork ,以便父进程可以立即返回并向
我是一名优秀的程序员,十分优秀!