Enable Extention in CentOs 7.9
ehsanwwe opened this issue · comments
php 8.0 ^ OpenCV 4.0.0 ^ CentOs7.9
2. in the CentOs we have single Root folder for each of PHP version so i upgrade your CentOS code to this code
yum install -y epel-release http://rpms.remirepo.net/enterprise/remi-release-7.rpm &&
yum-config-manager --enable remi-php80
yum install -y php-cli wget git php-devel make cmake gcc gcc-c++ phpconfig rpm-build rpmdevtools
git clone https://github.com/opencv/opencv_contrib.git
git clone https://github.com/opencv/opencv.git
cd opencv_contrib && git checkout 3.4
cd ../opencv && git checkout 3.4
cd .. && mkdir build && cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../opencv
make -j3
make install
cd ../..
echo "/usr/local/lib64" > etc/ld.so.conf.d/opencv.conf && ldconfig
yum -y install centos-release-scl && yum makecache && yum -y install devtoolset-7-gcc devtoolset-7-gcc-c++
scl enable devtoolset-7 bash
export PKG_CONFIG=/usr/bin/pkg-config && export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
git clone https://github.com/php-opencv/php-opencv.git
cd php-opencv && git checkout php8.0
/opt/cpanel/ea-php80/root/usr/bin/phpize && ./configure --with-php-config=/opt/cpanel/ea-php80/root/usr/bin/php-config
make -j3
make install
echo "extension=opencv.so" > /opt/cpanel/ea-php80/root/etc/php.d/opencv.ini
every things works well but in the last line i have problem !
my problem is in the last Line of the above code
if i add the last line of this code i got 503 error when Apache start
or if i add manualy extension=opencv.so on PHP.ini
i got the same error when apache start
also i try to add triple line of codes looklike your tutorial but finally i can't because in the CentOS i cant find the folder with the similar names in this code so i cant input and test it
i mean this ->
echo "extension=opencv.so" > /etc/php/8.1/cli/conf.d/opencv.ini
echo "extension=opencv.so" > /etc/php/8.1/fpm/conf.d/opencv.ini
echo "extension=opencv.so" > /etc/php/8.1/apache2/conf.d/opencv.ini
in the other seen , maybe my problem is locating opencv.so , what is location of opencv.so ? i search whole of the sever and cant find it