我在 ec2 上使用 amazon Linux 的第一个默认 AMI,但似乎无法安装 pyOpenSSL。 我试过了: sudo wget http://launchpad.net/pyopenssl/main/0.11/+download/pyOpenSSL-0.11.tar.gz && easy_install pyOpenSSL-0.11.tar.gz.
Results were:
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/lib/python2.6/site-packages/test-easy-install-21047.write-test'
还试过: 结果是:sudo python setup.py build
/usr/lib/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
running build
running build_py
running build_ext
building 'OpenSSL.crypto' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=pentium4 -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=pentium4 -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.6 -c OpenSSL/crypto/crypto.c -o build/temp.linux-i686-2.6/OpenSSL/crypto/crypto.o
OpenSSL/crypto/crypto.c:13:20: error: Python.h: No such file or directory
In file included from OpenSSL/crypto/crypto.h:17,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509.h:17:25: error: openssl/ssl.h: No such file or directory
In file included from OpenSSL/crypto/crypto.h:17,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509.h:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘crypto_X509_Type’
OpenSSL/crypto/x509.h:24: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
OpenSSL/crypto/x509.h:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/x509.h:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/x509.h:31: error: expected ‘)’ before ‘*’ token
In file included from OpenSSL/crypto/crypto.h:18,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509name.h:19: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/x509name.h:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘crypto_X509Name_Type’
OpenSSL/crypto/x509name.h:26: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from OpenSSL/crypto/crypto.h:19,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/netscape_spki.h:16: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/netscape_spki.h:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘crypto_NetscapeSPKI_Type’
OpenSSL/crypto/netscape_spki.h:23: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from OpenSSL/crypto/crypto.h:20,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509store.h:17: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/x509store.h:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘crypto_X509Store_Type’
OpenSSL/crypto/x509store.h:24: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from OpenSSL/crypto/crypto.h:21,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509req.h:17: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/x509req.h:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘crypto_X509Req_Type’
OpenSSL/crypto/x509req.h:24: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from OpenSSL/crypto/crypto.h:22,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/pkey.h:15: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/pkey.h:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘crypto_PKey_Type’
OpenSSL/crypto/pkey.h:22: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from OpenSSL/crypto/crypto.h:23,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509ext.h:16:28: error: openssl/x509v3.h: No such file or directory
In file included from OpenSSL/crypto/crypto.h:23,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/x509ext.h:18: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/x509ext.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘crypto_X509Extension_Type’
OpenSSL/crypto/x509ext.h:27: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from OpenSSL/crypto/crypto.h:24,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/pkcs7.h:15:27: error: openssl/pkcs7.h: No such file or directory
In file included from OpenSSL/crypto/crypto.h:24,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/pkcs7.h:17: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/pkcs7.h:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘crypto_PKCS7_Type’
OpenSSL/crypto/pkcs7.h:24: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
In file included from OpenSSL/crypto/crypto.h:25,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/pkcs12.h:14:28: error: openssl/pkcs12.h: No such file or directory
OpenSSL/crypto/pkcs12.h:15:26: error: openssl/asn1.h: No such file or directory
In file included from OpenSSL/crypto/crypto.h:25,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/pkcs12.h:17: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/pkcs12.h:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘crypto_PKCS12_Type’
OpenSSL/crypto/pkcs12.h:24: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
OpenSSL/crypto/pkcs12.h:37: error: expected ‘)’ before ‘*’ token
In file included from OpenSSL/crypto/crypto.h:26,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/crl.h:6: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crl.h:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘crypto_CRL_Type’
OpenSSL/crypto/crl.h:13: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
OpenSSL/crypto/crl.h:17: error: expected ‘)’ before ‘*’ token
In file included from OpenSSL/crypto/crypto.h:27,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/revoked.h:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘crypto_Revoked_Type’
OpenSSL/crypto/revoked.h:11: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
OpenSSL/crypto/revoked.h:15: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/revoked.h:16: error: expected ‘)’ before ‘*’ token
In file included from OpenSSL/crypto/crypto.h:28,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/../util.h:17:25: error: openssl/err.h: No such file or directory
In file included from OpenSSL/crypto/crypto.h:28,
from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/../util.h:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/../util.h:32: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/../util.h:63: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/../util.h:78: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/../util.h:83: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/../util.h:135: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from OpenSSL/crypto/crypto.c:15:
OpenSSL/crypto/crypto.h:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.h:74: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.h:75: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.h:76: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.h:77: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.h:78: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.h:80: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.h:81: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.h:83: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.c:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:27: error: expected ‘)’ before ‘*’ token
OpenSSL/crypto/crypto.c: In function ‘global_passphrase_callback’:
OpenSSL/crypto/crypto.c:42: error: ‘PyObject’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:42: error: (Each undeclared identifier is reported only once
OpenSSL/crypto/crypto.c:42: error: for each function it appears in.)
OpenSSL/crypto/crypto.c:42: error: ‘func’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:42: error: ‘argv’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:42: warning: left-hand operand of comma expression has no effect
OpenSSL/crypto/crypto.c:42: error: ‘ret’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:42: warning: left-hand operand of comma expression has no effect
OpenSSL/crypto/crypto.c:45: error: expected expression before ‘)’ token
OpenSSL/crypto/crypto.c:46: warning: implicit declaration of function ‘Py_BuildValue’
OpenSSL/crypto/crypto.c:47: warning: implicit declaration of function ‘PyEval_CallObject’
OpenSSL/crypto/crypto.c:48: warning: implicit declaration of function ‘Py_DECREF’
OpenSSL/crypto/crypto.c:49: error: ‘NULL’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:51: warning: implicit declaration of function ‘PyString_Check’
OpenSSL/crypto/crypto.c:53: warning: implicit declaration of function ‘PyErr_SetString’
OpenSSL/crypto/crypto.c:53: error: ‘PyExc_ValueError’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:56: warning: implicit declaration of function ‘PyString_Size’
OpenSSL/crypto/crypto.c:59: warning: implicit declaration of function ‘strncpy’
OpenSSL/crypto/crypto.c:59: warning: incompatible implicit declaration of built-in function ‘strncpy’
OpenSSL/crypto/crypto.c:59: warning: implicit declaration of function ‘PyString_AsString’
OpenSSL/crypto/crypto.c:59: warning: passing argument 2 of ‘strncpy’ makes pointer from integer without a cast
OpenSSL/crypto/crypto.c: At top level:
OpenSSL/crypto/crypto.c:75: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:150: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:249: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:296: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:352: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:399: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:456: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:500: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:552: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:583: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:600: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:615: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:662: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
OpenSSL/crypto/crypto.c:707: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘crypto_methods’
OpenSSL/crypto/crypto.c: In function ‘initcrypto’:
OpenSSL/crypto/crypto.c:810: error: ‘PyObject’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:810: error: ‘c_api_object’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:812: error: ‘module’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:814: warning: implicit declaration of function ‘ERR_load_crypto_strings’
OpenSSL/crypto/crypto.c:815: warning: implicit declaration of function ‘OpenSSL_add_all_algorithms’
OpenSSL/crypto/crypto.c:820: warning: implicit declaration of function ‘Py_InitModule3’
OpenSSL/crypto/crypto.c:820: error: ‘crypto_methods’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:823: error: ‘NULL’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:829: error: ‘crypto_X509_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:830: error: ‘crypto_X509Name_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:831: error: ‘crypto_X509Req_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:832: error: ‘crypto_X509Store_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:833: error: ‘crypto_PKey_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:835: error: ‘crypto_PKCS7_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:836: error: ‘crypto_NetscapeSPKI_New’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:837: warning: implicit declaration of function ‘PyCObject_FromVoidPtr’
OpenSSL/crypto/crypto.c:839: warning: implicit declaration of function ‘PyModule_AddObject’
OpenSSL/crypto/crypto.c:842: error: ‘crypto_Error’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:842: warning: implicit declaration of function ‘PyErr_NewException’
OpenSSL/crypto/crypto.c:848: warning: implicit declaration of function ‘PyModule_AddIntConstant’
OpenSSL/crypto/crypto.c:848: error: ‘X509_FILETYPE_PEM’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:849: error: ‘X509_FILETYPE_ASN1’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:852: error: ‘EVP_PKEY_RSA’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:853: error: ‘EVP_PKEY_DSA’ undeclared (first use in this function)
OpenSSL/crypto/crypto.c:859: warning: implicit declaration of function ‘init_crypto_x509’
OpenSSL/crypto/crypto.c:861: warning: implicit declaration of function ‘init_crypto_x509name’
OpenSSL/crypto/crypto.c:863: warning: implicit declaration of function ‘init_crypto_x509store’
OpenSSL/crypto/crypto.c:865: warning: implicit declaration of function ‘init_crypto_x509req’
OpenSSL/crypto/crypto.c:867: warning: implicit declaration of function ‘init_crypto_pkey’
OpenSSL/crypto/crypto.c:869: warning: implicit declaration of function ‘init_crypto_x509extension’
OpenSSL/crypto/crypto.c:871: warning: implicit declaration of function ‘init_crypto_pkcs7’
OpenSSL/crypto/crypto.c:873: warning: implicit declaration of function ‘init_crypto_pkcs12’
OpenSSL/crypto/crypto.c:875: warning: implicit declaration of function ‘init_crypto_netscape_spki’
OpenSSL/crypto/crypto.c:877: warning: implicit declaration of function ‘init_crypto_crl’
OpenSSL/crypto/crypto.c:879: warning: implicit declaration of function ‘init_crypto_revoked’
error: command 'gcc' failed with exit status 1
我认为我需要确保安装了 python devel 以获得 header ,检查了 yum 安装的内容。 百胜列表 | grep python 产生了:
audit-libs-python.i386 1.7.17-3.10.amzn1 installed
dbus-python.i386 0.83.0-6.1.5.amzn1 installed
gamin-python.i386 0.1.10-9.6.amzn1 installed
libselinux-python.i386 2.0.94-1.6.amzn1 installed
libsemanage-python.i386 2.0.43-4.2.amzn1 installed
libxml2-python.i386 2.7.6-1.6.amzn1 installed
policycoreutils-python.i386 2.0.82-28.1.5.amzn1 installed
python.noarch 1:2.6-1.19.amzn1 installed
python-cheetah.i386 2.4.1-1.6.amzn1 installed
python-configobj.noarch 4.6.0-2.1.5.amzn1 installed
python-iniparse.noarch 0.3.1-2.1.5.amzn1 installed
python-markdown.noarch 2.0.1-3.1.3.amzn1 installed
python-pycurl.i386 7.19.0-5.3.amzn1 installed
python-pygments.noarch 1.1.1-1.3.amzn1 installed
python-setuptools.noarch 0.6.10-1.7.amzn1 installed
python-sqlite.i386 2.6.0-1.8.amzn1 installed
python-urlgrabber.noarch 3.9.1-6.4.amzn1 installed
python-yaml.noarch 3.05-1.rf.6.amzn1 installed
python26.i686 2.6.6-1.15.amzn1 installed
python26-libs.i686 2.6.6-1.15.amzn1 installed
rpm-python.i386 4.8.0-9.27.amzn1 installed
setools-libs-python.i386 3.3.6-4.1.9.amzn1 installed
MySQL-python.i386 1.2.3-0.3.c1.1.4.amzn1 amzn
beecrypt-python.i686 4.1.2-10.1.1.6.amzn1 amzn
boost-mpich2-python.i386 1.41.0-11.3.amzn1 amzn
boost-openmpi-python.i386 1.41.0-11.3.amzn1 amzn
boost-python.i386 1.41.0-11.3.amzn1 amzn
cracklib-python.i386 2.8.16-2.8.amzn1 amzn
dbus-python-devel.i386 0.83.0-6.1.5.amzn1 amzn
ecryptfs-utils-python.i386 82-6.6.amzn1 amzn
freeradius-python.i386 2.1.9-1.3.amzn1 amzn
graphviz-python.i386 2.26.0-4.8.amzn1 amzn
libbdevid-python.i686 5.1.19.6-61.21.amzn1 amzn
libcap-ng-python.i386 0.6.4-2.6.amzn1 amzn
libieee1284-python.i386 0.2.9-4.6.amzn1 amzn
libxcb-python.i386 1.6-1.14.amzn1 amzn
libxslt-python.i386 1.1.26-1.4.amzn1 amzn
net-snmp-python.i386 1:5.5-21.5.amzn1 amzn
newt-python.i386 0.52.11-1.4.amzn1 amzn
postgresql-plpython.i686 8.4.5-1.6.amzn1 amzn
python-babel.noarch 0.9.4-5.1.2.amzn1 amzn
python-boto.noarch 1.9b-2.1.amzn1 amzn
python-crypto.i386 2.0.1-20.2.amzn1 amzn
python-dateutil.noarch 1.4.1-4.1.5.amzn1 amzn
python-decoratortools.noarch 1.7-4.1.3.amzn1 amzn
python-devel.noarch 1:2.6-1.19.amzn1 amzn
python-dmidecode.i386 3.10.12-1.2.amzn1 amzn
python-docutils.noarch 0.6-1.2.amzn1 amzn
python-epdb.noarch 0.11-4.0.amzn1 amzn
python-imaging.i386 1.1.6-18.3.amzn1 amzn
python-imaging-devel.i386 1.1.6-18.3.amzn1 amzn
python-jinja2.i386 2.2.1-1.2.amzn1 amzn
python-krbV.i386 1.0.13-10.4.amzn1 amzn
python-lcms.i386 1.18-0.1.beta1.4.amzn1 amzn
python-ldap.i386 2.2.0-2.2.10.amzn1 amzn
python-magic.i386 5.04-4.5.amzn1 amzn
python-paramiko.noarch 1.7.5-2.1.2.amzn1 amzn
python-sphinx.noarch 0.6.3-1.2.amzn1 amzn
python-sphinx-doc.noarch 0.6.3-1.2.amzn1 amzn
python24.i386 2.4.6-27.21.amzn1 amzn
python24-devel.i386 2.4.6-27.21.amzn1 amzn
python24-docs.noarch 2.4.4-1.11.amzn1 amzn
python24-tools.i386 2.4.6-27.21.amzn1 amzn
python26-devel.i686 2.6.6-1.15.amzn1 amzn
python26-docs.noarch 2.6.5-1.7.amzn1 amzn
python26-test.i686 2.6.6-1.15.amzn1 amzn
python26-tools.i686 2.6.6-1.15.amzn1 amzn
rrdtool-python.i686 1.3.8-6.3.amzn1 amzn
我安装了 python-devel 和 openssl-devel,并且能够构建和安装模块。但是,我无法导入它。
>>> import OpenSSL
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/OpenSSL/__init__.py", line 40, in <module>
from OpenSSL import crypto
ImportError: /usr/lib/python2.6/site-packages/OpenSSL/crypto.so: undefined symbol: crypto_X509Extension_Type
最佳答案
yum 安装 pyOpenSSL。应该先尝试这个
关于python - 在 Amazon Linux (EC2) 上安装 pyOpenSSL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4891417/
关闭。这个问题是opinion-based.它目前不接受答案。想要改进这个问题?更新问题,以便editingthispost可以用事实和引用来回答它.关闭4年前。Improvethisquestion我想在固定时间创建一系列低音和高音调的哔哔声。例如:在150毫秒时发出高音调的蜂鸣声在151毫秒时发出低音调的蜂鸣声200毫秒时发出低音调的蜂鸣声250毫秒的高音调蜂鸣声有没有办法在Ruby或Python中做到这一点?我真的不在乎输出编码是什么(.wav、.mp3、.ogg等等),但我确实想创建一个输出文件。
我想为Heroku构建一个Rails3应用程序。他们使用Postgres作为他们的数据库,所以我通过MacPorts安装了postgres9.0。现在我需要一个postgresgem并且共识是出于性能原因你想要pggem。但是我对我得到的错误感到非常困惑当我尝试在rvm下通过geminstall安装pg时。我已经非常明确地指定了所有postgres目录的位置可以找到但仍然无法完成安装:$envARCHFLAGS='-archx86_64'geminstallpg--\--with-pg-config=/opt/local/var/db/postgresql90/defaultdb/po
我打算为ruby脚本创建一个安装程序,但我希望能够确保机器安装了RVM。有没有一种方法可以完全离线安装RVM并且不引人注目(通过不引人注目,就像创建一个可以做所有事情的脚本而不是要求用户向他们的bash_profile或bashrc添加一些东西)我不是要脚本本身,只是一个关于如何走这条路的快速指针(如果可能的话)。我们还研究了这个很有帮助的问题:RVM-isthereawayforsimpleofflineinstall?但有点误导,因为答案只向我们展示了如何离线在RVM中安装ruby。我们需要能够离线安装RVM本身,并查看脚本https://raw.github.com/wayn
我有一个奇怪的问题:我在rvm上安装了rubyonrails。一切正常,我可以创建项目。但是在我输入“railsnew”时重新启动后,我有“程序'rails'当前未安装。”。SystemUbuntu12.04ruby-v"1.9.3p194"gemlistactionmailer(3.2.5)actionpack(3.2.5)activemodel(3.2.5)activerecord(3.2.5)activeresource(3.2.5)activesupport(3.2.5)arel(3.0.2)builder(3.0.0)bundler(1.1.4)coffee-rails(
我刚刚为fedora安装了emacs。我想用emacs编写ruby。为ruby提供代码提示、代码完成类型功能所需的工具、扩展是什么? 最佳答案 ruby-mode已经包含在Emacs23之后的版本中。不过,它也可以通过ELPA获得。您可能感兴趣的其他一些事情是集成RVM、feature-mode(Cucumber)、rspec-mode、ruby-electric、inf-ruby、rinari(用于Rails)等。这是我当前用于Ruby开发的Emacs配置:https://github.com/citizen428/emacs
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我的最终目标是安装当前版本的RubyonRails。我在OSXMountainLion上运行。到目前为止,这是我的过程:已安装的RVM$\curl-Lhttps://get.rvm.io|bash-sstable检查已知(我假设已批准)安装$rvmlistknown我看到当前的稳定版本可用[ruby-]2.0.0[-p247]输入命令安装$rvminstall2.0.0-p247注意:我也试过这些安装命令$rvminstallruby-2.0.0-p247$rvminstallruby=2.0.0-p247我很快就无处可去了。结果:$rvminstall2.0.0-p247Search
我实际上是在尝试使用RVM在我的OSX10.7.5上更新ruby,并在输入以下命令后:rvminstallruby我得到了以下回复:Searchingforbinaryrubies,thismighttakesometime.Checkingrequirementsforosx.Installingrequirementsforosx.Updatingsystem.......Errorrunning'requirements_osx_brew_update_systemruby-2.0.0-p247',pleaseread/Users/username/.rvm/log/138121
由于fast-stemmer的问题,我很难安装我想要的任何rubygem。我把我得到的错误放在下面。Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingfast-stemmer:ERROR:Failedtobuildgemnativeextension./System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/rubyextconf.rbcreatingMakefilemake"DESTDIR="cleanmake"DESTDIR=
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub