The latest version requires RSA symmetric key encryption, so M2Crypto is required. Poor team found that compilation is not easy at all. The following is a summary of my experiences.
Server Environment
$ lsb_release -aLSB Version::core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarchDistributor ID:RedHatEnterpriseASDescription:Red Hat Enterprise Linux AS release 4 (Nahant Update 4)Release:4Codename:NahantUpdate4
Download m2crypto-0.4102.tar.gz
(It must be 0.20.2, or "undefined symbol: RSA" will appear.VerifyPKCS1_PSS "error)
M2Crypto Installation failed. Please troubleshoot as follows
Dependent environment:
0.20.2:Python 2.3 or newerm2urllib2 requires Python 2.4 or newerOpenSSL 0.9.7 or newerSome optional new features will require OpenSSL 0.9.8 or newerSWIG 1.3.28 or newer required for buildingSWIG 1.3.30 or newer may be required with Python 2.5 or newer and Python 2.4 with Py_ssize_t patches$ swig -version
If the version of swig is earlier than 1.3.29, install the new version of swig-2.0.0 first.
$ Tar zxvf swig-2.0.0.tar.gz $ cd swig-2.0.0 $. /configure -- prefix = $ HOME/local/swig $ make & make install # Set $ HOME/local/swig/bin to the environment variable PATH and replace the original swig $ source ~ /. Bash_profile
Decompress compile M2Crypto-0.20.2
$ tar zxvf M2Crypto-0.20.2.tar.gz$ cd M2Crypto-0.20.2/$ ~/local/python/bin/python setup.py build
If error 1 is displayed: (the following problems may occur in earlier OpenSSL 0.9.7 versions)
“This openssl-devel package does not work your architecture?”
Then, modify the setup. py file and set # '-DI386'(Or directly download the modified setup. py file to replace the original one)
If error message 2 appears:
"/Usr/include/openssl/opensslconf. h: 13: Error: Unable to find 'opensslconf-i386.h' "# copy 'opensslconf-i386.h' to the current directory $ cp/usr/include/openssl/opensslconf-i386.h./
Recompile and install
$ ~/local/python/bin/python setup.py build$ ~/local/python/bin/python setup.py install
^_^ Succeeded!