搭建pyspider
服务后,启动时出现数据库错误:
mysql.connector.errors.ProgrammingError: 1045 (28000): Access denied for user 'root'@'localhost' (us
经检查,数据库密码正确,命令行可以正常登录。
查看日志,发现前面还有报错 Could not find phantomjs
stackoverflow有相同的问题, 点击查看链接
将解决方法整理如下(只有CentOS亲测OK,其实未测试):
Ubuntu
操作系统可以直接apt
安装:sudo apt-get install phantomjs
Mac
操作系统需要先安装npm
:
brew install npm
npm install -g phantomjs
CentOS
操作系统也需要先安装npm
:
yum install npm
npm install phantomjs-prebuilt
npm install phantomjs