簡體   English   中英

警告:PHP啟動:無法加載動態庫apc.so

[英]Warning: PHP Startup: Unable to load dynamic library apc.so

我的情況下,我嘗試安裝APC 我運行configure文件,它運行正常,但是當我嘗試make之時,出現以下錯誤:

/home/ghost/APC-3.1.13/apc_cache.c: In function ‘_apc_cache_user_update’:
/home/ghost/APC-3.1.13/apc_cache.c:818:63: error: ‘IS_CONSTANT_INDEX’ undeclared (first use in this function)
         switch(Z_TYPE_P((*slot)->value->data.user.val) & ~IS_CONSTANT_INDEX
                                                           ^
/home/ghost/APC-3.1.13/apc_cache.c:818:63: note: each undeclared identifier is reported only once for each function it appears in
/home/ghost/APC-3.1.13/apc_cache.c:820:22: error: ‘IS_CONSTANT_ARRAY’ undeclared (first use in this function)
             case IS_CONSTANT_ARRAY:
                  ^
Makefile:186: recipe for target 'apc_cache.lo' failed
make: *** [apc_cache.lo] Error 1

之后

我運行以下命令sh -c "echo 'extension=apc.so' >> /opt/lampp/etc/php.ini"

檢查是否安裝了APC

/opt/lampp/bin/php -r 'echo phpinfo()' | grep apc --color

輸出:

Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/apc.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/apc.so: cannot open shared object file: No such file or directory in Unknown on line 0

我如何解決它 ?

您正在嘗試使用PHP版本編譯擴展,其中IS_CONSTANT_INDEXIS_CONSTANT_ARRAY C常量不再可用 從那時起,APC擴展名尚未更新 該擴展似乎已被放棄,因為最后一次提交是在20139月12日

因此,您應該使用其他緩存擴展,還是升級APC擴展內部。 我寧願使用自版本5.5.0起與PHP捆綁在一起的OPcache

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM