-
Notifications
You must be signed in to change notification settings - Fork 43
Installation. troubleshooting
Vladimir Goncharov edited this page Jan 17, 2021
·
1 revision
while of after installation you can have some errors:
you forgot to enable php extension after installation / compilation
you forgot to enable php extension after installation / compilation
If you installed php-opencv from packages and have this error you need to remove php-opencv by command apt remove php-opencv
and install php-opencv from sources.
/opt/php-opencv/source/opencv2/core/opencv_mat.cc: In function 'void opencv_mat_update_property_by_c_mat(zval*, cv::Mat*)':
/usr/include/php7/Zend/zend_types.h:663:38: error: cannot convert 'zend_object*' {aka '_zend_object*'} to 'zval*' {aka '_zval_struct*'}
error: invalid conversion from 'zval* (*)(zval*, zval*, zval*, void**)' {aka '_zval_struct* (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)'} to 'zend_object_write_property_t' {aka 'void (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)'}
If you have php version less than 8.0 you need to checkout for right version after git clone
. For example:
git clone https://github.com/php-opencv/php-opencv.git && cd php-opencv && git checkout php7.4