wolfi-dev / os

Main package repository for production Wolfi images
Other
786 stars 212 forks source link

php-8.2-mysql: undefined symbol: EVP_PKEY_CTX_new #10921

Closed shyim closed 1 month ago

shyim commented 8 months ago

Looks like the linking of MySQL to OpenSSL is not working.

Dockerfile

FROM cgr.dev/chainguard/wolfi-base

RUN apk add --no-cache php-8.2 php-8.2-mysqlnd php-8.2-pdo_mysql

Execution:

44e33fb0232a:/# php -m
PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqlnd.so' (tried: /usr/lib/php/modules/mysqlnd.so (/usr/lib/php/modules/mysqlnd.so: undefined symbol: EVP_PKEY_CTX_new), /usr/lib/php/modules/mysqlnd.so.so (/usr/lib/php/modules/mysqlnd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: /usr/lib/php/modules/pdo_mysql.so (/usr/lib/php/modules/pdo_mysql.so: undefined symbol: pdo_parse_params), /usr/lib/php/modules/pdo_mysql.so.so (/usr/lib/php/modules/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[PHP Modules]
Core
date
filter
hash
json
libxml
pcre
random
readline
Reflection
session
SPL
sqlite3
standard
tokenizer
zlib

[Zend Modules]
ajayk commented 7 months ago

cc @vaikas

shyim commented 5 months ago

Installing the curl extension magically fixes this problem. I installed all dependencies of curl, the error is not gone. Only when the curl extension is installed the error is gone. Weird