Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PHP Warning: PHP Startup: Unable to load dynamic library 'openssl.so'#1565

Discussion options

problem I have been unable to resolve for two days

Anyone know how to fix the openssl.so not found error?

PHP Warning: PHP Startup: Unable to load dynamic library 'openssl.so' (tried: /usr/local/lib/php/pecl/20210902/openssl.so (dlopen(/usr/local/lib/php/pecl/20210902/openssl.so, 9): image not found), /usr/local/lib/php/pecl/20210902/openssl.so.so (dlopen(/usr/local/lib/php/pecl/20210902/openssl.so.so, 9): image not found)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'openssl.so' (tried: /usr/local/lib/php/pecl/20210902/openssl.so (dlopen(/usr/local/lib/php/pecl/20210902/openssl.so, 9): image not found), /usr/local/lib/php/pecl/20210902/openssl.so.so (dlopen(/usr/local/lib/php/pecl/20210902/openssl.so.so, 9): image not found)) in Unknown on line 0
PHP 8.1.15 (cli) (built: Feb 2 2023 18:43:34) (NTS)
Zend Engine v4.1.15, Copyright (c) Zend Technologies
with Zend OPcache v8.1.15, Copyright (c), by Zend Technologies
with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans

summary - what i tried

after macOS update to Big Sur 11.7.3,
fixed Xcode and made sure Command Line Tools are 13.2.1 per brew doctor
Usedbrew doctor to fix all warnings until "ready to brew" returned
completedbrew update && brew upgrade
Fixed asdf, fixed python, fixed nodejs, couldn't fix php
so
followed instructions fromgrav for multiple php versions

brew uninstall --ignore-dependencies opensslbrew uninstall --ignore-dependencies opensslbrew install openssl# put openssl first in the pathbrew tap shivammathur/phpbrew install shivammathur/php/php@7.4# edit php.ini, httpd.conf, and verify ~/.bashrc# testedbrew unlink php&& brew link --overwrite --force php@7.4brew services restart php@7.4# check http://localhost:8080/info.phpbrew install shivammathur/php/php@8.1# edit php.ini, httpd.conf, and verify ~/.bashrcbrew unlink php&& brew link --overwrite --force php@8.1# tested by brew services restart httpd and php@8.1# check http://localhost:8080/info.php# installed [PHP switcher script](https://gist.github.com/rhukster/f4c04f1bf59e0b74e335ee5d186a98e2)# check withsphp 7.4sphp 8.1

Install 8.2

brew install shivammathur/php/php@8.2brew unlink php&& brew link --overwrite --force php@8.2# edit php.imi, httpd.conf and varify .bashrcbrew services restart shivammathur/php/php# brew services only shows php@7.4 and php@8.1 but# php@8.1 started      <username>  ~/Library/LaunchAgents/homebrew.mxcl.php@8.1.plist#brew reinstall$(brew deps shivammathur/php/php@8.1) shivammathur/php/php@8.1sphp 8.2# still starting 8.1sphp 8.1# check info.php in localhost -seems fimne

Attempt update Xdebug

pecl uninstall -r xdebugpecl install xdebug
  • install completes and xdebug info available in localhost:info.php
  • but still seeing errors:

PHP Warning: PHP Startup: Unable to load dynamic library 'openssl.so' (tried: /usr/local/lib/php/pecl/20210902/openssl.so (dlopen(/usr/local/lib/php/pecl/20210902/openssl.so, 9): image not found), /usr/local/lib/php/pecl/20210902/openssl.so.so (dlopen(/usr/local/lib/php/pecl/20210902/openssl.so.so, 9): image not found)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'openssl.so' (tried: /usr/local/lib/php/pecl/20210902/openssl.so (dlopen(/usr/local/lib/php/pecl/20210902/openssl.so, 9): image not found), /usr/local/lib/php/pecl/20210902/openssl.so.so (dlopen(/usr/local/lib/php/pecl/20210902/openssl.so.so, 9): image not found)) in Unknown on line 0

  • Searched all local drives for openssl.so - only found in backups from 2019 when I was using anaconda and doing some stuff in R
brew info php@8.1
  • Shows openssl@1.1 ✔,

  • Checked for extension_dir in php.ini (/usr/local/lib/php/pecl/20210902)

  • contains the three things installed by pecl - xdebug.so, imagick.so, yaml.so

php --ini

PHP Warning: PHP Startup: Unable to load dynamic library 'openssl.so' (tried: /usr/local/lib/php/pecl/20210902/openssl.so (dlopen(/usr/local/lib/php/pecl/20210902/openssl.so, 9): image not found), /usr/local/lib/php/pecl/20210902/openssl.so.so (dlopen(/usr/local/lib/php/pecl/20210902/openssl.so.so, 9): image not found)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'openssl.so' (tried: /usr/local/lib/php/pecl/20210902/openssl.so (dlopen(/usr/local/lib/php/pecl/20210902/openssl.so, 9): image not found), /usr/local/lib/php/pecl/20210902/openssl.so.so (dlopen(/usr/local/lib/php/pecl/20210902/openssl.so.so, 9): image not found)) in Unknown on line 0
Configuration File (php.ini) Path: /usr/local/etc/php/8.1
Loaded Configuration File: /usr/local/etc/php/8.1/php.ini
Scan for additional .ini files in: /usr/local/etc/php/8.1/conf.d
Additional .ini files parsed: /usr/local/etc/php/8.1/conf.d/ext-opcache.ini,
/usr/local/etc/php/8.1/conf.d/ext-xdebug.ini

You must be logged in to vote

@kjon-life

The fileopenssl.so is not there as the openssl extension is compiled statically into php.
You have an ini entry to loadopenssl.so, which should not be there.

Please run the following command to check this

grep -r extension.*=.*openssl$(brew --prefix)/etc/php/8.1

Then comment out any lines withextension=openssl in the ini files that are uncommented by prefixing the line with a;.

Replies: 1 comment 1 reply

Comment options

@kjon-life

The fileopenssl.so is not there as the openssl extension is compiled statically into php.
You have an ini entry to loadopenssl.so, which should not be there.

Please run the following command to check this

grep -r extension.*=.*openssl$(brew --prefix)/etc/php/8.1

Then comment out any lines withextension=openssl in the ini files that are uncommented by prefixing the line with a;.

You must be logged in to vote
1 reply
@kjon-life
Comment options

thank you!!

Answer selected bykjon-life
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Labels
None yet
2 participants
@kjon-life@shivammathur

[8]ページ先頭

©2009-2025 Movatter.jp