mac系统xampp安装pdflib扩展失败

发布于 2022-09-04 09:14:32 字数 11928 浏览 28 评论 0

/Applications/XAMPP/xamppfiles/bin/pecl install pdflib
Password:
downloading pdflib-4.1.1.tgz ...
Starting to download pdflib-4.1.1.tgz (33,080 bytes)
.........done: 33,080 bytes
7 source files, building
running: phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
path to pdflib installation? : /usr/local
building in /private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1
running: /private/tmp/pear/temp/pdflib/configure --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config --with-pdflib=/usr/local
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin15.6.0
checking host system type... x86_64-apple-darwin15.6.0
checking target system type... x86_64-apple-darwin15.6.0
checking for PHP prefix... /Applications/XAMPP/xamppfiles
checking for PHP includes... -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib
checking for PHP extension directory... /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix... /Applications/XAMPP/xamppfiles/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for PDFlib support... yes, shared
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15.6.0 dyld
(cached) (cached) checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/libtool --mode=compile cc  -I. -I/private/tmp/pear/temp/pdflib -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/include -I/private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/main -I/private/tmp/pear/temp/pdflib -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/pdflib/pdf.c -o pdf.lo
mkdir .libs
 cc -I. -I/private/tmp/pear/temp/pdflib -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/include -I/private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/main -I/private/tmp/pear/temp/pdflib -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/pdflib/pdf.c  -fno-common -DPIC -o .libs/pdf.o
/bin/sh /private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/libtool --mode=link g++ -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/include -I/private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/main -I/private/tmp/pear/temp/pdflib -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -o pdf.la -export-dynamic -avoid-version -prefer-pic -module -rpath /private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/modules  pdf.lo -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lpdf -framework ApplicationServices
g++ ${wl}-undefined ${wl}dynamic_lookup -o .libs/pdf.so -bundle  .libs/pdf.o  -L/usr/local/lib /usr/local/lib/libpdf.dylib  -Wl,-rpath -Wl,/usr/local/lib -framework ApplicationServices
dsymutil .libs/pdf.so || :
creating pdf.la
(cd .libs && rm -f pdf.la && ln -s ../pdf.la pdf.la)
/bin/sh /private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/libtool --mode=install cp ./pdf.la /private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/modules
cp ./.libs/pdf.so /private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/modules/pdf.so
cp ./.libs/pdf.lai /private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/modules/pdf.la
----------------------------------------------------------------------
Libraries have been installed in:
   /private/tmp/pear/temp/pear-build-rootQtqvhc/pdflib-4.1.1/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

running: make INSTALL_ROOT="/private/tmp/pear/temp/pear-build-rootQtqvhc/install-pdflib-4.1.1" install
Installing shared extensions:     /private/tmp/pear/temp/pear-build-rootQtqvhc/install-pdflib-4.1.1/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/
running: find "/private/tmp/pear/temp/pear-build-rootQtqvhc/install-pdflib-4.1.1" | xargs ls -dils
6680745   0 drwxr-xr-x  3 root  wheel     102 12 29 15:27 /private/tmp/pear/temp/pear-build-rootQtqvhc/install-pdflib-4.1.1
6681164   0 drwxr-xr-x  3 root  wheel     102 12 29 15:27 /private/tmp/pear/temp/pear-build-rootQtqvhc/install-pdflib-4.1.1/Applications
6681165   0 drwxr-xr-x  3 root  wheel     102 12 29 15:27 /private/tmp/pear/temp/pear-build-rootQtqvhc/install-pdflib-4.1.1/Applications/XAMPP
6681166   0 drwxr-xr-x  3 root  wheel     102 12 29 15:27 /private/tmp/pear/temp/pear-build-rootQtqvhc/install-pdflib-4.1.1/Applications/XAMPP/xamppfiles
6681167   0 drwxr-xr-x  3 root  wheel     102 12 29 15:27 /private/tmp/pear/temp/pear-build-rootQtqvhc/install-pdflib-4.1.1/Applications/XAMPP/xamppfiles/lib
6681168   0 drwxr-xr-x  3 root  wheel     102 12 29 15:27 /private/tmp/pear/temp/pear-build-rootQtqvhc/install-pdflib-4.1.1/Applications/XAMPP/xamppfiles/lib/php
6681169   0 drwxr-xr-x  3 root  wheel     102 12 29 15:27 /private/tmp/pear/temp/pear-build-rootQtqvhc/install-pdflib-4.1.1/Applications/XAMPP/xamppfiles/lib/php/extensions
6681170   0 drwxr-xr-x  3 root  wheel     102 12 29 15:27 /private/tmp/pear/temp/pear-build-rootQtqvhc/install-pdflib-4.1.1/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226
6681171 264 -rwxr-xr-x  1 root  wheel  133248 12 29 15:27 /private/tmp/pear/temp/pear-build-rootQtqvhc/install-pdflib-4.1.1/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/pdf.so

Build process completed successfully
Installing '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/pdf.so'
install ok: channel://pecl.php.net/pdflib-4.1.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=pdf.so" to php.ini

在php.ini中添加extension="pdf.so",重启Apache,phpinfo中没有出现pdflib,扩展添加失败
/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/pdf.so 这个文件确实存在
而且我有试过php.ini添加/extensions/no-debug-non-zts-20131226/中的其他*.so文件,phpinfo中可以显示扩展添加成功。
请问该怎么办?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文