Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

centos安装扩展失败 #134

Closed
needrunning opened this issue Jun 27, 2019 · 18 comments · Fixed by #138
Closed

centos安装扩展失败 #134

needrunning opened this issue Jun 27, 2019 · 18 comments · Fixed by #138

Comments

@needrunning
Copy link

编译最后一步

sudo make && make install

In file included from /usr/local/src/php-ext-excel-export/library/third_party/minizip/zip.c:186:
/usr/local/src/php-ext-excel-export/library/third_party/minizip/crypt.h:35: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
/usr/local/src/php-ext-excel-export/library/third_party/minizip/crypt.h:48: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
/usr/local/src/php-ext-excel-export/library/third_party/minizip/crypt.h:65: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
/usr/local/src/php-ext-excel-export/library/third_party/minizip/crypt.h:94: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
/usr/local/src/php-ext-excel-export/library/third_party/minizip/zip.c: In function ‘zipOpenNewFileInZip4_64’:
/usr/local/src/php-ext-excel-export/library/third_party/minizip/zip.c:1245: error: ‘curfile64_info’ has no member named ‘crypt_header_size’
/usr/local/src/php-ext-excel-export/library/third_party/minizip/zip.c:1251: error: ‘curfile64_info’ has no member named ‘pcrc_32_tab’
/usr/local/src/php-ext-excel-export/library/third_party/minizip/zip.c:1254: error: ‘curfile64_info’ has no member named ‘pcrc_32_tab’
/usr/local/src/php-ext-excel-export/library/third_party/minizip/zip.c:1255: error: ‘curfile64_info’ has no member named ‘crypt_header_size’
/usr/local/src/php-ext-excel-export/library/third_party/minizip/zip.c: In function ‘zip64FlushWriteBuffer’:
/usr/local/src/php-ext-excel-export/library/third_party/minizip/zip.c:1375: error: ‘curfile64_info’ has no member named ‘pcrc_32_tab’
/usr/local/src/php-ext-excel-export/library/third_party/minizip/zip.c:1375: error: ‘curfile64_info’ has no member named ‘pcrc_32_tab’
/usr/local/src/php-ext-excel-export/library/third_party/minizip/zip.c: In function ‘zipCloseFileInZipRaw64’:
/usr/local/src/php-ext-excel-export/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

环境
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

@viest
Copy link
Owner

viest commented Jun 30, 2019

zlib 依赖是否安装?

@needrunning
Copy link
Author

needrunning commented Jun 30, 2019 via email

@remicollet
Copy link
Contributor

remicollet commented Jul 1, 2019

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)

@viest
Copy link
Owner

viest commented Jul 1, 2019

@remicollet 👍

@viest viest closed this as completed Jul 1, 2019
@needrunning
Copy link
Author

@remicollet 👍

看了链接 不太明白啊 那如何解决这个扩展安装失败问题?

@viest
Copy link
Owner

viest commented Jul 1, 2019

@needrunning

https://rpms.remirepo.net/wizard/

选择你的系统版本、PHP版本、安装类型,下面会生成一个使用向导。

@viest viest reopened this Jul 1, 2019
@viest
Copy link
Owner

viest commented Jul 1, 2019

@needrunning 我将重新开启这个 issues ,待解决时关闭。

@remicollet
Copy link
Contributor

Would be nice to use english....

@viest
Copy link
Owner

viest commented Jul 1, 2019

@remicollet

I will create a new issue to guide the user to use https://rpms.remirepo.net/

Pinned issue #137

@viest
Copy link
Owner

viest commented Jul 1, 2019

@needrunning

Has your problem been solved?

@needrunning
Copy link
Author

@needrunning

Has your problem been solved?

I'm working on something that hasn't been solved yet

@needrunning
Copy link
Author

@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

@remicollet
Copy link
Contributor

remicollet commented Jul 2, 2019

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

@remicollet
Copy link
Contributor

remicollet commented Jul 2, 2019

@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.

@viest
Copy link
Owner

viest commented Jul 2, 2019

@remicollet The serious backwardness of the CentOS version is indeed a problem.

@viest
Copy link
Owner

viest commented Jul 2, 2019

@remicollet I will post an emergency fix version 1.2.6

@remicollet
Copy link
Contributor

The serious backwardness of the CentOS version is indeed a problem.

https://twitter.com/RemiCollet/status/903155214441738240 ;)

@viest
Copy link
Owner

viest commented Jul 2, 2019

@remicollet Thank you for your contribution 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants