Home >Backend Development >PHP Problem >How to install php zbarcode
How to install php zbarcode: 1. Install ImageMagick dependencies through yum; 2. Install zbar extension; 3. Install php-devel; 4. Download and install php-zbarcode through git; 5. Restart apache.
The operating environment of this article: linux5.9.8 system, PHP7.1 version, DELL G3 computer
How to install php zbarcode?
Steps to install php-zbarcode
1 Install ImageMagick dependencies
yum install ImageMagick ImageMagick-devel
2 Install zbar extension
wget -c http://jaist.dl.sourceforge.net/project/zbar/zbar/0.10/zbar-0.10.tar.bz2 tar jxvf zbar-0.10.tar.bz2 cd zbar-0.10 ./configure --without-gtk --without-python --without-qt --prefix=/usr/local/zbar ##禁止gtk,python和qt的支持 make && make install
3 Install php-devel
yum install php-devel
4 Install php-zbarcode
git clone https://github.com/mkoppanen/php-zbarcode.git cd php-zbarcode /usr/bin/phpize #自己phpize的位置 ./configure --with-php-config=/usr/bin/php-config --with-zbarcode=/usr/local/zbar/ make && make install
5 Add extension=zbarcode.so to php.ini and restart apache
Recommended learning: "PHP Video Tutorial》
The above is the detailed content of How to install php zbarcode. For more information, please follow other related articles on the PHP Chinese website!