编译安装php时报错

错误1:

安装包:php-5.6.20.tar.bz2

编译成功完成,结果在make的时候报错

libtool: link: `ext/opcache/ZendAccelerator.lo' is not a valid libtool object

解决办法:

# make distclean

重新编译,make,通过

错误2:

启动php-fpm时报错:

Starting php-fpm [22-May-2017 11:18:29] ERROR: [pool www] cannot get uid for user 'nginx'


意思是没有nginx用户,添加就好了

# useradd nginx


错误3:

配置好php和nginx之后,访问index.php时一片空白


解决办法:

        location ~ \.php$ {
            root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
            include        fastcgi.conf;                                         
        }


你可能感兴趣的:(编译安装php时报错)