Dear Community,
I've tried different methods of installing a php extension for MongoDB on my Centos server but this doesn't seem to work so far.
I'm using php 8.1 on Centos 8 Stream and normally I always use the same command. But it doesn't seem to work this time.
When running the following command: pecl install mongodb
The installation ends with the following lines.
... libtool: compile: cc -I. -I/var/tmp/mongodb -I/var/tmp/pear-build-rootA0mHla/mongodb-1.10.0/include -I/var/tmp/pear-build-rootA0mHla/mongodb-1.10.0/main -I/var/tmp/mongodb -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/var/tmp/mongodb/src/libmongoc/src/common/ -I/var/tmp/mongodb/src/libmongoc/src/libbson/src/ -I/var/tmp/mongodb/src/libmongoc/src/libbson/src/jsonsl/ -I/var/tmp/mongodb/src/libmongoc/src/libmongoc/src/ -I/var/tmp/mongodb/src/libmongocrypt/src/ -I/var/tmp/mongodb/src/libmongocrypt/kms-message/src/ -I/var/tmp/mongodb/src/libmongocrypt-compat/ -I/var/tmp/mongodb/src/BSON/ -I/var/tmp/mongodb/src/MongoDB/ -I/var/tmp/mongodb/src/MongoDB/Exception/ -I/var/tmp/mongodb/src/MongoDB/Monitoring/ -I/var/tmp/mongodb/src/contrib/ -DHAVE_CONFIG_H -g -O2 -c /var/tmp/mongodb/src/MongoDB/BulkWrite.c -MMD -MF src/MongoDB/BulkWrite.dep -MT src/MongoDB/BulkWrite.lo -fPIC -DPIC -o src/MongoDB/.libs/BulkWrite.o
In file included from /var/tmp/mongodb/src/MongoDB/BulkWrite.c:26:
/var/tmp/mongodb/src/MongoDB/BulkWrite.c: In function ‘php_phongo_bulkwrite_init_ce’:
/var/tmp/mongodb/php_phongo.h:174:21: error: ‘zend_class_serialize_deny’ undeclared (first use in this function); did you mean ‘zend_ce_serializable’?
ce->serialize = zend_class_serialize_deny; \
^~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/mongodb/src/MongoDB/BulkWrite.c:669:2: note: in expansion of macro ‘PHONGO_CE_DISABLE_SERIALIZATION’
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_bulkwrite_ce);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/mongodb/php_phongo.h:174:21: note: each undeclared identifier is reported only once for each function it appears in
ce->serialize = zend_class_serialize_deny; \
^~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/mongodb/src/MongoDB/BulkWrite.c:669:2: note: in expansion of macro ‘PHONGO_CE_DISABLE_SERIALIZATION’
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_bulkwrite_ce);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/mongodb/php_phongo.h:175:21: error: ‘zend_class_unserialize_deny’ undeclared (first use in this function); did you mean ‘zend_unserialize_data’?
ce->unserialize = zend_class_unserialize_deny; \
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/mongodb/src/MongoDB/BulkWrite.c:669:2: note: in expansion of macro ‘PHONGO_CE_DISABLE_SERIALIZATION’
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_bulkwrite_ce);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:915: src/MongoDB/BulkWrite.lo] Error 1
ERROR: `make' failed
What exactly am I doing wrong? I have Selinux turned on but that would not be a problem with such an installation