Closed needrunning closed 5 years ago
zlib 依赖是否安装?
这个安装过的。
发自我的iPhone
------------------ 原始邮件 ------------------ 发件人: viest notifications@github.com 发送时间: 2019年6月30日 15:25 收件人: viest/php-ext-excel-export php-ext-excel-export@noreply.github.com 抄送: needrunning 610212129@qq.com, Author author@noreply.github.com 主题: 回复:[viest/php-ext-excel-export] centos安装扩展失败 (#134)
zlib 依赖是否安装?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
On CentOS, don't build from sources, simply use https://rpms.remirepo.net/ Which have nearly all extensions available, including this one, for all PHP versions (5.4 to 7.4)
@remicollet 👍
@remicollet 👍
看了链接 不太明白啊 那如何解决这个扩展安装失败问题?
@needrunning 我将重新开启这个 issues ,待解决时关闭。
Would be nice to use english....
@remicollet
I will create a new issue to guide the user to use https://rpms.remirepo.net/
Pinned issue #137
@needrunning
Has your problem been solved?
@needrunning
Has your problem been solved?
I'm working on something that hasn't been solved yet
@needrunning
Has your problem been solved?
now I have two problems
one: in order to install pxlswriter via pecl install pxlswriter, Do you need to reinstall PHP?
two: I have runed pecl install pxlswriter in my server , As shown below
lude/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/tmp/pear/install/xlswriter/library/include -I/tmp/pear/install/xlswriter -I/tmp/pear/install/xlswriter/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/install/xlswriter/library/third_party/minizip/zip.c -fPIC -DPIC -o library/third_party/minizip/.libs/zip.o /tmp/pear/install/xlswriter/library/third_party/minizip/zip.c:160: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘attribute’ before ‘’ token In file included from /tmp/pear/install/xlswriter/library/third_party/minizip/zip.c:186: /tmp/pear/install/xlswriter/library/third_party/minizip/crypt.h:35: error: expected ‘;’, ‘,’ or ‘)’ before ‘’ token /tmp/pear/install/xlswriter/library/third_party/minizip/crypt.h:48: error: expected ‘;’, ‘,’ or ‘)’ before ‘’ token /tmp/pear/install/xlswriter/library/third_party/minizip/crypt.h:65: error: expected ‘;’, ‘,’ or ‘)’ before ‘’ token /tmp/pear/install/xlswriter/library/third_party/minizip/crypt.h:94: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token /tmp/pear/install/xlswriter/library/third_party/minizip/zip.c: In function ‘zipOpenNewFileInZip4_64’: /tmp/pear/install/xlswriter/library/third_party/minizip/zip.c:1245: error: ‘curfile64_info’ has no member named ‘crypt_header_size’ /tmp/pear/install/xlswriter/library/third_party/minizip/zip.c:1251: error: ‘curfile64_info’ has no member named ‘pcrc_32_tab’ /tmp/pear/install/xlswriter/library/third_party/minizip/zip.c:1254: error: ‘curfile64_info’ has no member named ‘pcrc_32_tab’ /tmp/pear/install/xlswriter/library/third_party/minizip/zip.c:1255: error: ‘curfile64_info’ has no member named ‘crypt_header_size’ /tmp/pear/install/xlswriter/library/third_party/minizip/zip.c: In function ‘zip64FlushWriteBuffer’: /tmp/pear/install/xlswriter/library/third_party/minizip/zip.c:1375: error: ‘curfile64_info’ has no member named ‘pcrc_32_tab’ /tmp/pear/install/xlswriter/library/third_party/minizip/zip.c:1375: error: ‘curfile64_info’ has no member named ‘pcrc_32_tab’ /tmp/pear/install/xlswriter/library/third_party/minizip/zip.c: In function ‘zipCloseFileInZipRaw64’: /tmp/pear/install/xlswriter/library/third_party/minizip/zip.c:1610: error: ‘curfile64_info’ has no member named ‘crypt_header_size’ make: *** [library/third_party/minizip/zip.lo] Error 1
There is 2 ways
1/ build everything from sources (php, libraries, extensions...)
notice : "pecl install" is building from sources
2/ use the package manager and rely on a good packages provider
How was installed you PHP ?
Using "remi" is the most easy way (and the only provider for CentoOS 6, only 3rd party repo only provide new PHP versions for C7)
Nothing need to be built from sources
yum install php-pecl-xlswriter
@viest BTW, I confirm that building from sources xlswriter using bundled library doesn't work on old CentOS 6 with old compiler and old system tools / libraries.
C6 is now terrible old (9 years), and will be EOL in a few months (Nov 2020).
RPM packages build fine on C6, but only use the system library which is built separately, with another build system (cmake), which probably detect more needed compatibility options.
@remicollet The serious backwardness of the CentOS version is indeed a problem.
@remicollet I will post an emergency fix version 1.2.6
The serious backwardness of the CentOS version is indeed a problem.
@remicollet Thank you for your contribution 👍
编译最后一步
sudo make && make install
环境 PHP 7.2.13 (cli) (built: Dec 8 2018 12:27:01) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.7, Copyright (c) 1999-2018, by Zend Technologies
rinting-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.7 (Final) Release: 6.7 Codename: Final