VPS侦探论坛

 找回密码
 注册
查看: 4951|回复: 3

ubuntu 12.04.10 LTS + lnmp0.9安装 exif报错

[复制链接]
发表于 2013-2-25 23:43:33 | 显示全部楼层 |阅读模式

按照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 返回如下信息:
  1. Configuring for:
  2. PHP Api Version:         20041225
  3. Zend Module Api No:      20060613
  4. Zend Extension Api No:   220060519
  5. configure.in:3: warning: prefer named diversions
  6. configure.in:3: warning: prefer named diversions
复制代码

步骤2、执行 sudo ./configure --with-php-config=/usr/local/php/bin/php-config,返回如下信息:
  1. /local/php/bin/php-config
  2. checking for grep that handles long lines and -e... /bin/grep
  3. checking for egrep... /bin/grep -E
  4. checking for a sed that does not truncate output... /bin/sed
  5. checking for cc... cc
  6. checking whether the C compiler works... yes
  7. checking for C compiler default output file name... a.out
  8. checking for suffix of executables...
  9. checking whether we are cross compiling... no
  10. checking for suffix of object files... o
  11. checking whether we are using the GNU C compiler... yes
  12. checking whether cc accepts -g... yes
  13. checking for cc option to accept ISO C89... none needed
  14. checking how to run the C preprocessor... cc -E
  15. checking for icc... no
  16. checking for suncc... no
  17. checking whether cc understands -c and -o together... yes
  18. checking for system library directory... lib
  19. checking if compiler supports -R... no
  20. checking if compiler supports -Wl,-rpath,... yes
  21. checking build system type... x86_64-unknown-linux-gnu
  22. checking host system type... x86_64-unknown-linux-gnu
  23. checking target system type... x86_64-unknown-linux-gnu
  24. checking for PHP prefix... /usr/local/php
  25. 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
  26. checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613
  27. checking for PHP installed headers prefix... /usr/local/php/include/php
  28. checking if debug is enabled... no
  29. checking if zts is enabled... no
  30. checking for re2c... re2c
  31. checking for re2c version... 0.13.5 (ok)
  32. checking for gawk... gawk
  33. checking whether to enable EXIF (metadata from images) support... yes, shared
  34. checking for ld used by cc... /usr/bin/ld
  35. checking if the linker (/usr/bin/ld) is GNU ld... yes
  36. checking for /usr/bin/ld option to reload object files... -r
  37. checking for BSD-compatible nm... /usr/bin/nm -B
  38. checking whether ln -s works... yes
  39. checking how to recognize dependent libraries... pass_all
  40. checking for ANSI C header files... yes
  41. checking for sys/types.h... yes
  42. checking for sys/stat.h... yes
  43. checking for stdlib.h... yes
  44. checking for string.h... yes
  45. checking for memory.h... yes
  46. checking for strings.h... yes
  47. checking for inttypes.h... yes
  48. checking for stdint.h... yes
  49. checking for unistd.h... yes
  50. checking dlfcn.h usability... yes
  51. checking dlfcn.h presence... yes
  52. checking for dlfcn.h... yes
  53. checking the maximum length of command line arguments... 1572864
  54. checking command to parse /usr/bin/nm -B output from cc object... ok
  55. checking for objdir... .libs
  56. checking for ar... ar
  57. checking for ranlib... ranlib
  58. checking for strip... strip
  59. checking if cc supports -fno-rtti -fno-exceptions... no
  60. checking for cc option to produce PIC... -fPIC
  61. checking if cc PIC flag -fPIC works... yes
  62. checking if cc static flag -static works... yes
  63. checking if cc supports -c -o file.o... yes
  64. checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
  65. checking whether -lc should be explicitly linked in... no
  66. checking dynamic linker characteristics... GNU/Linux ld.so
  67. checking how to hardcode library paths into programs... immediate
  68. checking whether stripping libraries is possible... yes
  69. checking if libtool supports shared libraries... yes
  70. checking whether to build shared libraries... yes
  71. checking whether to build static libraries... no

  72. creating libtool
  73. appending configuration tag "CXX" to libtool
  74. configure: creating ./config.status
  75. config.status: creating config.h
  76. config.status: config.h is unchanged
复制代码


步骤3、执行 sudo make && make install ,返回如下信息:
  1. Build complete.
  2. Don't forget to run 'make test'.

  3. Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
  4. make: *** [install-modules] 错误 1
复制代码


步骤4、
修改/usr/local/php/etc/php.ini

重启lnmp,如下提示:
  1. Shutting down php_fpm . done
  2. PHP-FPM program is stop
  3. Shutting down MySQL
  4. . *
  5. MySQL program is stop
  6. Starting LNMP...
  7. Nginx start successfully!
  8. 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
  9. done
  10. PHP-FPM start successfully!
  11. Starting MySQL
  12. . *
  13. MySQL start successfully!
复制代码
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2013-2-25 23:45:44 | 显示全部楼层


无法完成exif的安装,军哥帮看看原因。谢谢。~~~
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2013-2-26 08:47:57 | 显示全部楼层

看一下/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/ 这个目录权限是否可写
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2013-2-26 11:43:49 | 显示全部楼层



谢谢,解决了,必须使用root才能完成安装 ,ubuntu默认不启用root,虽然有sudo命令。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-12-29 02:27 , Processed in 0.026848 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表