spawn-fcgi启动报错
//编译生成bin文件,这里用到了fcgi和google的glog
# g++ test.cpp -lfcgi -lglog -o test
//运行
# spawn-fcgi -a 127.0.0.1 -p 8080 -f /root/cgi_demo/test
错误:spawn-fcgi: child exited with: 127
解决办法:
//fcgi和glog都需要建立软连接, 正常情况下只要在/usr/lib目录下建立链接就可以了,如果不行的话在/usr/lib64目录下也建立链接
# ln -s /usr/local/lib/libfcgi.so.0 /usr/lib/libfcgi.so.0
# ln -s /usr/local/lib/libfcgi.so.0 /usr/lib64/libfcgi.so.0
# ln -s /usr/local/lib/libglog.so.0 /usr/lib/libglog.so.0
# ln -s /usr/local/lib/libglog.so.0 /usr/lib64/libglog.so.0
参考:http://github.tiankonguse.com/blog/2015/01/19/cgi-nginx-three.html