centos 下安装 pyspider 问题汇总
今天在安装 pyspider 的时候,遇到好多坑,记录一下
Could not run curl-config: [Errno 2] No such file or directory
搜索了好久,都是Ubuntu下sudo apt-get install libcurl4-openssl-dev的结果,centos下却没有这个包,可是我的curl明明就已经安装过了呀,郁闷
执行yum install libcurl-devel,没想到却又可以了。error: command 'gcc' failed with exit status 1
执行yum install python-develfatal error: libxml/xmlversion.h: No such file or directory
执行yum install libxslt-devel libxml2-devel#error minimum required version of libxml2 is 2.7.0
一开始进入误区,非要安装 RPM 的libxml2包,卡在系统版本与包不兼容的验证问题上,只好换源码包安装了,顺利编译libxml2和libxslt# error "Need libcurl version 7.19.0 or greater to compile pycurl."
继续报错,下载curl源码包编译安装ImportError: libcurl.so.4: cannot open shared object file: No such file or directory
看来刚才编译安装的包没认到正确的路径啊解决方法
- vim /etc/ld.so.conf
- 添加以下几行:
1
2
3/usr/local/lib
/usr/lib
/lib - sudo ldconfig
ImportError: No module named _sqlite3
执行yum install sqite-devel,然后重新编译python执行
pyspider,终于成功了~