您的位置 首页 php

phpstudy 自编译php7.4 composer 修复openssl

昨天装好后还有瑕疵

composer require leruge/tp6-doc

Warning: Failed loading Zend extension ‘opcache’ (tried: /Applications/phpstudy/Extensions/php/php7.4.27/lib/php/extensions/opcache (dlopen(/Applications/phpstudy/Extensions/php/php7.4.27/lib/php/extensions/opcache, 9): image not found), /Applications/phpstudy/Extensions/php/php7.4.27/lib/php/extensions/opcache.so (dlopen(/Applications/phpstudy/Extensions/php/php7.4.27/lib/php/extensions/opcache.so, 9): image not found)) in Unknown on line 0

pecl install openssl

Warning: Failed loading Zend extension ‘opcache’ (tried: /Applications/phpstudy/Extensions/php/php7.4.27/lib/php/extensions/opcache (dlopen(/Applications/phpstudy/Extensions/php/php7.4.27/lib/php/extensions/opcache, 9): image not found), /Applications/phpstudy/Extensions/php/php7.4.27/lib/php/extensions/opcache.so (dlopen(/Applications/phpstudy/Extensions/php/php7.4.27/lib/php/extensions/opcache.so, 9): image not found)) in Unknown on line 0

No releases available for package “pecl.php.net/openssl”

install failed

于是去源码里编译 提示

configure: error: Package requirements (openssl >= 1.0.1) were not met:

No package ‘openssl’ found

提示没有 openssl

brew install openssl

后 brew link openssl –force

后面的语句都执行一遍

export PATH=”/usr/local/opt/openssl@3/bin:$PATH”

export LD FLAGS =”-L/usr/local/opt/openssl@3/lib”

export CPPFLAGS=”-I/usr/local/opt/openssl@3/ include

export PKG_CONFIG_PATH=”/usr/local/opt/openssl@3/lib/pkgconfig”

再次执行 configure 不报错了

make 报错

将刚刚的版本里3 换成 1.1 重新 configure make && make install 修改php.ini

文章来源:智云一二三科技

文章标题:phpstudy 自编译php7.4 composer 修复openssl

文章地址:https://www.zhihuclub.com/78899.shtml

关于作者: 智云科技

热门文章

网站地图