- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我尝试通过下载源代码并执行以下命令安装pycrypto模块python setup.py install
,然后出现错误
running install
running build
running build_py
running build_ext
warning: GMP library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Hash.MD2' extension
gcc -pthread -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.5 -c src/MD2.c -o build/temp.linux-x86_64-2.5/src/MD2.o
src/MD2.c:31:20: error: Python.h: No such file or directory
src/MD2.c:118: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
In file included from src/MD2.c:134:
src/hash_template.c:42: error: expected specifier-qualifier-list before 'PyObject_HEAD'
src/hash_template.c:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PyTypeObject'
src/hash_template.c: In function 'newALGobject':
src/hash_template.c:55: warning: implicit declaration of function 'PyObject_New'
src/hash_template.c:55: error: expected expression before 'ALGobject'
src/hash_template.c:55: warning: assignment makes pointer from integer without a cast
src/hash_template.c: At top level:
src/hash_template.c:62: error: expected ')' before '*' token
src/hash_template.c:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
src/hash_template.c:96: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
src/hash_template.c:108: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
src/hash_template.c:143: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
src/hash_template.c:160: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ALG_methods'
src/hash_template.c:169: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
src/hash_template.c:178: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ALGtype'
src/hash_template.c:203: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
src/hash_template.c:237: error: array type has incomplete element type
src/hash_template.c:238: error: 'PyCFunction' undeclared here (not in a function)
src/hash_template.c:238: error: expected '}' before 'ALG_new'
src/hash_template.c: In function 'initMD2':
src/hash_template.c:254: error: 'PyObject' undeclared (first use in this function)
src/hash_template.c:254: error: (Each undeclared identifier is reported only once
src/hash_template.c:254: error: for each function it appears in.)
src/hash_template.c:254: error: 'm' undeclared (first use in this function)
src/hash_template.c:256: error: 'ALGtype' undeclared (first use in this function)
src/hash_template.c:256: error: 'PyType_Type' undeclared (first use in this function)
src/hash_template.c:257: warning: implicit declaration of function 'Py_InitModule'
src/hash_template.c:260: error: 'o' undeclared (first use in this function)
src/hash_template.c:260: warning: implicit declaration of function 'PyInt_FromLong'
src/hash_template.c:260: warning: implicit declaration of function 'PyDict_SetItemString'
src/hash_template.c:260: warning: implicit declaration of function 'PyModule_GetDict'
src/hash_template.c:260: warning: implicit declaration of function 'Py_DECREF'
src/hash_template.c:263: warning: implicit declaration of function 'PyErr_Occurred'
src/hash_template.c:264: warning: implicit declaration of function 'Py_FatalError'
error: command 'gcc' failed with exit status 1
这意味着他没有找到 Python.h。我在网上搜索了这个错误,似乎通过安装 python 头文件可以解决问题,但是我的 Debian lenny 出现了另一个错误。
apt-get install python2.6-dev
和错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package python2.6-dev
最佳答案
不要从源代码安装它。安装 Debian 软件包:
aptitude install python-crypto
并安装 python 开发文件(如果您遵循我的上述建议,则无论如何都不需要):
aptitude install python-dev
关于python - 无法在 Debian lenny 上安装 python 模块 "pycrypto",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7913140/
我在安装 java 后在 Debian Lenny 上安装了 Eclipse (apt-get install sun-java6-jre sun-java6-plugin sun-java6-jdk
嘿, 尝试将 qooxdoo 与 debian lenny 一起使用。qooxdoo SDK 1.2 create-application.py 好的,但我在generate.py 上遇到了问题: /
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a software
我正在尝试在我的 debian - lenny 上编译 VXI11 源代码,但出现此错误: make rpcgen -M vxi11.x make: rpcgen: command not found
如果世界上某个地方已经有这个问题的答案,请提前道歉,但我已经花了 3 小时尝试将它安装到我的生产服务器中,但我没有任何进展。 我的需求: 我想在我的服务器上运行 git 命令(例如:推送、提交等)。为
在 OpenSuse 11.2 上,我成功编译、链接并运行了以下代码,该代码使用 unixODBC 为 MySQL 数据库安装了数据源: #include #include #include #
我在一些服务器上安装的 Python (2.6) 编译时没有我现在需要的 curses 支持,尽管服务器安装了 libncurses5,Python 没有为它编译绑定(bind),所以当我“导入 cu
我正在 Debian Lenny 上从源代码构建 python2.6。 (./configure make make altinstall) 我不希望它与现有的任何东西发生冲突,但我希望它位于 bas
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 9 年前。 Improve this
短篇小说: 我需要 sqlite3 的 >3.7.3 版本,但我目前有 3.5.?。如何升级软件包? 长话短说: 尝试安装 etherpad-lite(etherpad 的 node.js 实现)。由
我尝试通过下载源代码并执行以下命令安装pycrypto模块python setup.py install,然后出现错误 running install running build running bu
我在生产服务器上遇到 unicode 文件名问题。当我尝试保存文件时,发生 UnicodeEncodeError 异常。 Devserver 工作正常。 www-data 的所有语言环境都是“en_U
保留问答环节: 我在使用最新 (v.2.4.2) OpenCV 版本时遇到了一个奇怪的问题,安装失败并出现以下错误: In file included from /OpenCV-2.4.2/modul
我正在使用 Selenium 测试我的网站,它使用 Firefox 打开一个 URL,登录并在页面上做一些事情,然后注销并关闭 Firefox。这一切在 Windows 7 上运行良好。代码以: We
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 10 年前。 Improve thi
我按照 node.js wiki 中的说明安装了 node.js。所以我将 debian sid 源放在我的源列表中并安装了 Node 。之后,我使用 wiki 站点的 curl cmd 安装了 np
我想在我的 php ini 文件中关闭生产环境中的 display_errors,并将错误保存在日志文件中。在尝试了几个小时都没有成功之后,我决定征求建议。 我做了什么: 在根据php信息加载的ini
我试过了 apt-get update 在 Debian Lenny 上,但出现以下错误。如何解决此问题以便可以安装 PostgreSql 9.1? root:~# apt-get update Ig
我正在尝试通过 NPM 在 Debian Lenny (5.0) 上永久安装,但我在安装过程中收到以下错误,开头为: > node-waf configure build npm ERR! TypeE
我想用 XtraDB 将我的 Debian Lenny 32 位服务器上的 MySQL 5.1 替换为 Percona Server。主要原因是 Percona 的性能更好。 它是运行着许多服务的生产
我是一名优秀的程序员,十分优秀!