日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

php cannot load service mmap.,php swoole 安装失败

發布時間:2024/9/30 php 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 php cannot load service mmap.,php swoole 安装失败 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

看到一個基于swoole的聊天室,php 環境根據yum安裝lnmp安裝好了,之后安裝swoole,但是失敗了

[root@VM_0_14_centos html]# cat /etc/redhat-release

CentOS Linux release 7.2.1511 (Core)

[root@VM_0_14_centos html]# pecl install swoole

Could not download from "http://pecl.php.net/get/swoole-4.2.7.tgz", cannot download "pecl/swoole" (File http://pecl.php.net:80/get/swoole-4.2.7.tgz not valid (received: HTTP/1.0 500 Internal Server Error

))

Error: cannot download "pecl/swoole"

Download failed

install failed

于是開始源碼安裝

#git clone https://github.com/swoole/swoole-src

#cd swoole-src

#phpize

#./configure

checking for gcc... no

checking for cc... no

checking for cl.exe... no

configure.sh:error:no acceptable C compiler found in $PATH

See 'config.log' for more details.

更新:

后來重新安裝成功了

#yum -y install gcc

#./configure

checking how to run the C++ preprocessor... /lib/cpp

configure: error: C++ preprocessor "/lib/cpp" fails sanity check

See `config.log' for more details.

#yum install glibc-headers gcc-c++

#./configure

Build complete.

Don't forget to run 'make test'.

Installing shared extensions: /usr/lib64/php/modules/

Installing header files: /usr/include/php/

#vi /etc/php.ini

extension= /usr/lib64/php/modules/swoole.so

但是使用的時候Redis啟動不了。

[root@VM_0_14_centos php-chatroom]# systemctl start redis

Job for redis.service failed because the control process exited with error code. See "systemctl status redis.service" and "journalctl -xe" for details.

[root@VM_0_14_centos php-chatroom]# systemctl status redis.service

● redis.service - Redis persistent key-value database

Loaded: loaded (/usr/lib/systemd/system/redis.service; disabled; vendor preset: disabled)

Drop-In: /etc/systemd/system/redis.service.d

└─limit.conf

Active: failed (Result: exit-code) since Thu 2018-11-15 14:32:52 CST; 16s ago

Process: 12519 ExecStop=/usr/libexec/redis-shutdown (code=exited, status=1/FAILURE)

Process: 12518 ExecStart=/usr/bin/redis-server /etc/redis.conf --supervised systemd (code=exited, status=1/FAILURE)

Main PID: 12518 (code=exited, status=1/FAILURE)

Nov 15 14:32:51 VM_0_14_centos systemd[1]: Starting Redis persistent key-value database...

Nov 15 14:32:51 VM_0_14_centos systemd[1]: redis.service: main process exited, code=exited, status=1/FAILURE

Nov 15 14:32:52 VM_0_14_centos redis-shutdown[12519]: Could not connect to Redis at 127.0.0.1:6379: Connection refused

Nov 15 14:32:52 VM_0_14_centos systemd[1]: redis.service: control process exited, code=exited status=1

Nov 15 14:32:52 VM_0_14_centos systemd[1]: Failed to start Redis persistent key-value database.

Nov 15 14:32:52 VM_0_14_centos systemd[1]: Unit redis.service entered failed state.

Nov 15 14:32:52 VM_0_14_centos systemd[1]: redis.service failed.

更新:

在systemctl 啟動redis

找到答案 chown redis:redis /var/log/redis/redis.log

[root@VM_0_14_centos php-chatroom]# systemctl status redis

● redis.service - Redis persistent key-value database

Loaded: loaded (/usr/lib/systemd/system/redis.service; disabled; vendor preset: disabled)

Drop-In: /etc/systemd/system/redis.service.d

└─limit.conf

Active: active (running) since Thu 2018-11-15 15:20:18 CST; 37s ago

Main PID: 15239 (redis-server)

CGroup: /system.slice/redis.service

└─15239 /usr/bin/redis-server 127.0.0.1:6379

Nov 15 15:20:18 VM_0_14_centos systemd[1]: Starting Redis persistent key-value database...

Nov 15 15:20:18 VM_0_14_centos systemd[1]: Started Redis persistent key-value database.

總結

以上是生活随笔為你收集整理的php cannot load service mmap.,php swoole 安装失败的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。