VPS侦探论坛

 找回密码
 注册
查看: 4514|回复: 4

lnmp下安装owncloud问题

[复制链接]
发表于 2017-2-9 23:36:17 | 显示全部楼层 |阅读模式

lnmp下安装owncloud问题,一直提示几个错误!
1.  中:/dev/urandom 无法被 PHP 读取,出于安全原因,这是强烈不推荐的

2. 中:PHP 似乎没有设置好查询的系统环境变量。 用 getenv(\"PATH\") 测试只返回一个空值。
    英:Please check the installation documentation ↗
for php configuration notes and the php configuration of your server, especially when using php-fpm.


php版本5.6.22   pathinfo也是开启的

搜了很久也没有解决了,麻烦军哥!

PS:我尝试了用oneinstack的一键lnmp,没有这个问题!
         但是我想用军哥的lnmp,习惯了

求解决办法,辛苦


[ 本帖最后由 jasonstar 于 2017-2-10 00:05 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-2-10 09:48:16 | 显示全部楼层


/dev/urandom 这个可以参照这个 https://lnmp.org/faq/lnmp-vhost-add-howto.html#user.ini 修改


2、在php-fpm.conf 中加上 env[PATH] = /usr/local/bin:/usr/bin:/bin:/usr/local/php/bin
重启一下php-fpm就可以了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-2-10 13:04:20 | 显示全部楼层

回复 2# 的帖子


这2个问题搞定啦!谢谢军哥

但是在为owncloud 安装apcu时 出现问题了,百度 google 论坛无果!!

根据这篇教程 https://www.vpser.net/manage/lnmp-php-install-ext.html  进行的安装

我先在https://github.com/krakjoe/apcu 下载的apcu

然后
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config   

在make && make install时出错。。显示  make: *** [apc.lo] Error 1   【完整错误信息放在帖子后】

然后我google一圈 yum install pcre-devel 后 也是那个错误!实在无能为力了!




【完整错误】
[root@iZ28f5evvmgZ apcu]# make
/bin/sh /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/libtool --mode=compile cc -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/lnmp1.3-full/src/php-5.6.22/ext/apcu -DPHP_ATOM_INC -I/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/include -I/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/main -I/root/lnmp1.3-full/src/php-5.6.22/ext/apcu -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/usr/local/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c -o apc.lo
cc -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/lnmp1.3-full/src/php-5.6.22/ext/apcu -DPHP_ATOM_INC -I/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/include -I/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/main -I/root/lnmp1.3-full/src/php-5.6.22/ext/apcu -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/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c  -fPIC -DPIC -o .libs/apc.o
In file included from /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_sma.h:34,
                 from /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_pool.h:33,
                 from /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache.h:36,
                 from /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:35:
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_sma_api.h:46: error: expected specifier-qualifier-list before ‘zend_long’
In file included from /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_pool.h:36,
                 from /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache.h:36,
                 from /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:35:
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_pool_api.h:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_pool_api.h:143: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache.h:40,
                 from /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:35:
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:44: error: expected specifier-qualifier-list before ‘zend_string’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:53: error: expected specifier-qualifier-list before ‘zend_long’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:67: error: expected specifier-qualifier-list before ‘zend_long’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:82: error: expected specifier-qualifier-list before ‘zend_long’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:101: error: expected specifier-qualifier-list before ‘zend_long’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:139: error: expected declaration specifiers or ‘...’ before ‘zend_long’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:140: error: expected declaration specifiers or ‘...’ before ‘zend_long’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:141: error: expected declaration specifiers or ‘...’ before ‘zend_long’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:142: error: expected declaration specifiers or ‘...’ before ‘zend_long’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:216: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:223: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:230: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:236: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:245: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:250: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:272: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:290: error: expected declaration specifiers or ‘...’ before ‘zend_string’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:390: error: expected declaration specifiers or ‘...’ before ‘zend_long’
In file included from /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache.h:40,
                 from /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:35:
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_cache_api.h:390: error: expected declaration specifiers or ‘...’ before ‘zend_long’
In file included from /root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:36:
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc_globals.h:44: error: expected specifier-qualifier-list before ‘zend_long’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:41:31: error: zend_smart_str.h: No such file or directory
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c: In function ‘apc_flip_hash’:
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:336: warning: passing argument 2 of ‘zend_hash_get_current_data_ex’ from incompatible pointer type
/usr/local/php/include/php/Zend/zend_hash.h:182: note: expected ‘void **’ but argument is of type ‘struct Bucket **’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:336: error: too few arguments to function ‘zend_hash_get_current_data_ex’
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:338:61: error: macro "zend_hash_update" requires 6 arguments, but only 3 given
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:338: error: ‘zend_hash_update’ undeclared (first use in this function)
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:338: error: (Each undeclared identifier is reported only once
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:338: error: for each function it appears in.)
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:340:68: error: macro "zend_hash_index_update" requires 5 arguments, but only 3 given
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:340: error: ‘zend_hash_index_update’ undeclared (first use in this function)
/root/lnmp1.3-full/src/php-5.6.22/ext/apcu/apc.c:345: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/usr/local/php/include/php/Zend/zend_variables.h:51: note: expected ‘struct zval **’ but argument is of type ‘struct zval *’
make: *** [apc.lo] Error 1
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-2-10 18:56:17 | 显示全部楼层



不清楚你具体apcu的版本,php 5.6的话是用apcu 4.0.11是正常的,5.* 都是php7用的
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-2-10 20:08:57 | 显示全部楼层

回复 4# 的帖子


果然用了4.0.11版本的 就可以安装成功了

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-17 02:50 , Processed in 0.026566 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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