在一台新的centos6.7开发机,配置完环境后运行django项目如下报错
原因是:在Centos6.7系统中自带GMP version 4,但是一些应用如PyCrypto需要使用GMP >= 5。
需要进行以下处理
yum -y groupinstall "Development tools"
yum -y install gcc libgcc glibc libffi-devel libxml2-devel libxslt-devel openssl-devel zlib-devel bzip2-devel ncurses-devel python-devel
wget https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2
tar xvjf gmp-6.1.0.tar.bz2
cd gmp-6.1.0
./configure
make
make check
make install
yum install python-pip -y
pip install --ignore-installed PyCrypto
完美解决
参考文章,非常感谢这位大哥
http://blog.51cto.com/molewan/1727258
修改了一些地方