ubuntu 12.04.10 LTS + lnmp0.9安装 exif报错
按照https://www.vpser.net/manage/lnmp-php-install-ext.html教程来安装exif,过程有错。无法开启exif。进入php安装程序目录/home/temp/lnmp0.9-full/php-5.2.17/ext/exif/下,按如下操作。
步骤1、执行 sudo /usr/local/php/bin/phpize 返回如下信息:
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
步骤2、执行 sudo ./configure --with-php-config=/usr/local/php/bin/php-config,返回如下信息:
/local/php/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /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-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local/php
checking for PHP includes... -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/ local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/us r/local/php/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613
checking for PHP installed headers prefix... /usr/local/php/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking whether to enable EXIF (metadata from images) support... yes, shared
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /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 the maximum length of command line arguments... 1572864
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 if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
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
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
步骤3、执行 sudo make && make install ,返回如下信息:
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
make: *** 错误 1
步骤4、修改/usr/local/php/etc/php.ini
重启lnmp,如下提示:
Shutting down php_fpm . done
PHP-FPM program is stop
Shutting down MySQL
. *
MySQL program is stop
Starting LNMP...
Nginx start successfully!
Starting php_fpm PHP Warning:PHP Startup: Unable to load dynamic library '/usr/local/php/lib/php/ extensions/no-debug-non-zts-20060613/exif.so' - /usr/local/php/lib/php/extensions/no-debug-non-zts- 20060613/exif.so: cannot open shared object file: No such file or directory in Unknown on line 0
done
PHP-FPM start successfully!
Starting MySQL
. *
MySQL start successfully! 无法完成exif的安装,军哥帮看看原因。谢谢。~~~ 看一下/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/ 这个目录权限是否可写 谢谢,解决了,必须使用root才能完成安装 ,ubuntu默认不启用root,虽然有sudo命令。
页:
[1]