当前位置:论坛首页 > Linux面板 > 建议

官网文档中提供的opcache安装脚本出错了

发表在 Linux面板2016-11-15 15:50 [复制链接] 6 5903

本帖最后由 dd235698 于 2016-11-15 15:54 编辑

配置如下:
阿里云ECS服务器
CentOS Linux  7.2.1511
宝塔2.6.3

http://www.bt.cn/Help/Find?id=92
官网文档中提供的opcache安装脚本出错了,提示如下
  1. [root@iZuf6iqn00z9x3v77nyw5bZ ~]# wget http://125.88.182.172:5880/ext/opcache.sh && sh opcache.sh
  2. --2016-11-15 15:44:51--  http://125.88.182.172:5880/ext/opcache.sh
  3. 正在连接 125.88.182.172:5880... 已连接。
  4. 已发出 HTTP 请求,正在等待回应... 200 OK
  5. 长度:3142 (3.1K) [application/octet-stream]
  6. 正在保存至: “opcache.sh.1”

  7. 100%[============================================================================>] 3,142       --.-K/s 用时 0s

  8. 2016-11-15 15:44:51 (523 MB/s) - 已保存 “opcache.sh.1” [3142/3142])

  9. opcache.sh:行4: Install_Opcache: 未找到命令
  10. =======================================================
  11. 1) PHP-5.2
  12. 2) PHP-5.3
  13. 3) PHP-5.4
  14. 4) PHP-5.5
  15. 5) PHP-5.6
  16. 6) PHP-7.0
  17. 请选择要安装Opcache的PHP版本.
  18. Plese select to install Opcache of php version(1-6): 5
  19. =======================================================
  20. php-5.6 已安装过Opcache,请选择其它版本!
  21. php-5.6 not install, Plese select other version!
  22. opcache.sh:行55: Install_Opcache: 未找到命令
  23. opcache.sh: 第 56 行:return: 只能从函数或者源脚本`返回'
  24. 环境校验通过!
  25. 现在开始安装Opcache吗?
  26. Ready You a start the Opcache installation?(y/n): y
  27. --2016-11-15 15:45:10--  http://125.88.182.172:5880/src/zendopcache-7.0.5.tgz
  28. 正在连接 125.88.182.172:5880... 已连接。
  29. 已发出 HTTP 请求,正在等待回应... 200 OK
  30. 长度:97101 (95K) [application/octet-stream]
  31. 正在保存至: “zendopcache-7.0.5.tgz.1”

  32. 100%[============================================================================>] 97,101      --.-K/s 用时 0.09s

  33. 2016-11-15 15:45:10 (1.03 MB/s) - 已保存 “zendopcache-7.0.5.tgz.1” [97101/97101])

  34. Configuring for:
  35. PHP Api Version:         20131106
  36. Zend Module Api No:      20131226
  37. Zend Extension Api No:   220131226
  38. checking for grep that handles long lines and -e... /bin/grep
  39. checking for egrep... /bin/grep -E
  40. checking for a sed that does not truncate output... /bin/sed
  41. checking for cc... cc
  42. checking whether the C compiler works... yes
  43. checking for C compiler default output file name... a.out
  44. checking for suffix of executables...
  45. checking whether we are cross compiling... no
  46. checking for suffix of object files... o
  47. checking whether we are using the GNU C compiler... yes
  48. checking whether cc accepts -g... yes
  49. checking for cc option to accept ISO C89... none needed
  50. checking how to run the C preprocessor... cc -E
  51. checking for icc... no
  52. checking for suncc... no
  53. checking whether cc understands -c and -o together... yes
  54. checking for system library directory... lib
  55. checking if compiler supports -R... no
  56. checking if compiler supports -Wl,-rpath,... yes
  57. checking build system type... x86_64-unknown-linux-gnu
  58. checking host system type... x86_64-unknown-linux-gnu
  59. checking target system type... x86_64-unknown-linux-gnu
  60. checking for PHP prefix... /www/server/php/56
  61. checking for PHP includes... -I/www/server/php/56/include/php -I/www/server/php/56/include/php/main -I/www/server/php/56/include/php/TSRM -I/www/server/php/56/include/php/Zend -I/www/server/php/56/include/php/ext -I/www/server/php/56/include/php/ext/date/lib
  62. checking for PHP extension directory... /www/server/php/56/lib/php/extensions/no-debug-non-zts-20131226
  63. checking for PHP installed headers prefix... /www/server/php/56/include/php
  64. checking if debug is enabled... no
  65. checking if zts is enabled... no
  66. checking for re2c... no
  67. configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
  68. checking for gawk... gawk
  69. checking whether to enable Zend OPcache support... yes, shared
  70. checking for mprotect... yes
  71. checking for sysvipc shared memory support... yes
  72. checking for mmap() using MAP_ANON shared memory support... yes
  73. checking for mmap() using /dev/zero shared memory support... yes
  74. checking for mmap() using shm_open() shared memory support... no
  75. checking for mmap() using regular file shared memory support... yes
  76. checking "whether flock struct is linux ordered"... "yes"
  77. checking "whether flock struct is BSD ordered"... "no"
  78. checking for ld used by cc... /bin/ld
  79. checking if the linker (/bin/ld) is GNU ld... yes
  80. checking for /bin/ld option to reload object files... -r
  81. checking for BSD-compatible nm... /bin/nm -B
  82. checking whether ln -s works... yes
  83. checking how to recognize dependent libraries... pass_all
  84. checking for ANSI C header files... yes
  85. checking for sys/types.h... yes
  86. checking for sys/stat.h... yes
  87. checking for stdlib.h... yes
  88. checking for string.h... yes
  89. checking for memory.h... yes
  90. checking for strings.h... yes
  91. checking for inttypes.h... yes
  92. checking for stdint.h... yes
  93. checking for unistd.h... yes
  94. checking dlfcn.h usability... yes
  95. checking dlfcn.h presence... yes
  96. checking for dlfcn.h... yes
  97. checking the maximum length of command line arguments... 1572864
  98. checking command to parse /bin/nm -B output from cc object... ok
  99. checking for objdir... .libs
  100. checking for ar... ar
  101. checking for ranlib... ranlib
  102. checking for strip... strip
  103. checking if cc supports -fno-rtti -fno-exceptions... no
  104. checking for cc option to produce PIC... -fPIC
  105. checking if cc PIC flag -fPIC works... yes
  106. checking if cc static flag -static works... no
  107. checking if cc supports -c -o file.o... yes
  108. checking whether the cc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
  109. checking whether -lc should be explicitly linked in... no
  110. checking dynamic linker characteristics... GNU/Linux ld.so
  111. checking how to hardcode library paths into programs... immediate
  112. checking whether stripping libraries is possible... yes
  113. checking if libtool supports shared libraries... yes
  114. checking whether to build shared libraries... yes
  115. checking whether to build static libraries... no

  116. creating libtool
  117. appending configuration tag "CXX" to libtool
  118. configure: creating ./config.status
  119. config.status: creating config.h
  120. config.status: config.h is unchanged
  121. /bin/sh /root/zendopcache-7.0.5/libtool --mode=compile cc  -I. -I/root/zendopcache-7.0.5 -DPHP_ATOM_INC -I/root/zendopcache-7.0.5/include -I/root/zendopcache-7.0.5/main -I/root/zendopcache-7.0.5 -I/www/server/php/56/include/php -I/www/server/php/56/include/php/main -I/www/server/php/56/include/php/TSRM -I/www/server/php/56/include/php/Zend -I/www/server/php/56/include/php/ext -I/www/server/php/56/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/zendopcache-7.0.5/ZendAccelerator.c -o ZendAccelerator.lo
  122. mkdir .libs
  123. cc -I. -I/root/zendopcache-7.0.5 -DPHP_ATOM_INC -I/root/zendopcache-7.0.5/include -I/root/zendopcache-7.0.5/main -I/root/zendopcache-7.0.5 -I/www/server/php/56/include/php -I/www/server/php/56/include/php/main -I/www/server/php/56/include/php/TSRM -I/www/server/php/56/include/php/Zend -I/www/server/php/56/include/php/ext -I/www/server/php/56/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/zendopcache-7.0.5/ZendAccelerator.c  -fPIC -DPIC -o .libs/ZendAccelerator.o
  124. /root/zendopcache-7.0.5/ZendAccelerator.c:39:35: 致命错误:TSRM/tsrm_virtual_cwd.h:没有那个文件或目录
  125. #include "TSRM/tsrm_virtual_cwd.h"
  126.                                    ^
  127. 编译中断。
  128. make: *** [ZendAccelerator.lo] 错误 1
  129. /bin/sh /root/zendopcache-7.0.5/libtool --mode=compile cc  -I. -I/root/zendopcache-7.0.5 -DPHP_ATOM_INC -I/root/zendopcache-7.0.5/include -I/root/zendopcache-7.0.5/main -I/root/zendopcache-7.0.5 -I/www/server/php/56/include/php -I/www/server/php/56/include/php/main -I/www/server/php/56/include/php/TSRM -I/www/server/php/56/include/php/Zend -I/www/server/php/56/include/php/ext -I/www/server/php/56/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/zendopcache-7.0.5/ZendAccelerator.c -o ZendAccelerator.lo
  130. cc -I. -I/root/zendopcache-7.0.5 -DPHP_ATOM_INC -I/root/zendopcache-7.0.5/include -I/root/zendopcache-7.0.5/main -I/root/zendopcache-7.0.5 -I/www/server/php/56/include/php -I/www/server/php/56/include/php/main -I/www/server/php/56/include/php/TSRM -I/www/server/php/56/include/php/Zend -I/www/server/php/56/include/php/ext -I/www/server/php/56/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/zendopcache-7.0.5/ZendAccelerator.c  -fPIC -DPIC -o .libs/ZendAccelerator.o
  131. /root/zendopcache-7.0.5/ZendAccelerator.c:39:35: 致命错误:TSRM/tsrm_virtual_cwd.h:没有那个文件或目录
  132. #include "TSRM/tsrm_virtual_cwd.h"
  133.                                    ^
  134. 编译中断。
  135. make: *** [ZendAccelerator.lo] 错误 1
  136. Reload service php-fpm  done
复制代码




使用道具 举报 只看该作者 回复
发表于 2016-11-15 16:32:47 | 显示全部楼层
php 5.6已经内建有opcache了的
使用道具 举报 回复 支持 反对
发表于 2016-11-16 15:01:30 | 显示全部楼层
hitrun 发表于 2016-11-15 16:32
php 5.6已经内建有opcache了的

phpifo显示有Zend OPcache,但Zend Guard Loader就没了~

QQ截图20161116145343.png
QQ截图20161116145846.png


剩下了很多垃圾文件,请问哪些可以删除掉。

QQ截图20161116145621.png

使用道具 举报 回复 支持 反对
发表于 2016-11-17 01:04:46 | 显示全部楼层
hitrun 发表于 2016-11-15 16:32
php 5.6已经内建有opcache了的

刚发现的,这代码重复了十几遍。。。。。

QQ图片20161117010227.png
使用道具 举报 回复 支持 反对
发表于 2016-11-21 15:50:10 | 显示全部楼层
防沉补丁!v0.1
使用道具 举报 回复 支持 反对
发表于 2019-4-5 11:44:20 | 显示全部楼层
MetInfo米拓网站模板 91aa.top
0000.jpg
使用道具 举报 回复 支持 反对
发表于 2019-6-18 11:05:43 | 显示全部楼层
手动开启opcache是不是就不会有这个问题了?
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理
快速回复 返回顶部 返回列表