Laravel Composer The Process class relies on proc_open, which is not available on your PHP installation. 错误

拉取项目,然后执行 composer install 报如下错误:

1
2
[Symfony\Component\Process\Exception\RuntimeException]                                   
The Process class relies on proc_open, which is not available on your PHP installation.

报错图片

解决方法:

找到php配置文件php.ini打开,搜索disable_functions指令,找到类似如下内容:

1
disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server

找到proc_open并删除即可,然后重启php。

再次 composer install 又报了如下错误:

1
2
[ErrorException]                                          
proc_get_status() has been disabled for security reasons

报错图片

同样的,找到php配置文件php.ini打开,搜索disable_functions指令,找到类似如下内容:

1
disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server

找到proc_get_status并删除即可,然后重启php。

坚持原创技术分享,您的支持将鼓励我继续创作!
0%