phpstudy 自编译php7.4 composer 修复openssl

2022-10-11 21:58:46 154 0
魁首哥

昨天装好后还有瑕疵

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

收藏
分享
海报
0 条评论
154
上一篇:2020最新大厂PHP面试题(附答案) 下一篇:6个常见的PHP安全性攻击

本站已关闭游客评论,请登录或者注册后再评论吧~

忘记密码?

图形验证码