有時候在Ubuntu部署laravel項目的時候安裝composer install會提示The Process class relies on proc_open, which is not available on your PHP installation.這種問題有兩種解決方:
第一種就是網(wǎng)上說的刪除php.ini文件里的disable_functions選項中的proc_open
詳細命令如下:
每個人安裝的PHP版本都不同,安裝的路徑也不同,使用以下命令找到php.ini配置文件,這個命令會列出php.ini所在的路徑,找到后刪除disable_functions選項中的proc_open即可。
find / -name php.ini
如果第一種方法沒有作用,還是報錯,比如:phar:///usr/local/bin/composer/vendor/symfony/process/Process.php on line 1345
那么可以試試刪除composer。
apt remove composer
如果提示不能刪除或者找不到composer那么就重新安裝試試。
apt install composer
一般重新安裝composer還是不行,因為你的系統(tǒng)缺少一些 PHP 擴展,Composer 需要這些擴展來運行。以下命令安裝擴展
安裝 ext-curl
:
sudo apt install php-curl
安裝 ext-dom
:
sudo apt install php-xml
安裝 ext-xml
:
sudo apt install php-xml
安裝完這些擴展后,重啟 Apache 或nginx 或 PHP-FPM 服務以使更改生效:文章來源:http://www.zghlxwxcb.cn/news/detail-767375.html
systemctl restart apache2
systemctl restart nginx
systemctl restart php-fpm
我的環(huán)境是Ubuntu22.04.3 PHP8.0.2?
?文章來源地址http://www.zghlxwxcb.cn/news/detail-767375.html
到了這里,關于解決啟用proc_open時提示The Process class relies on proc_open, which is not available on your PHP i nstall.的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!