docker启动hyperf报错提示缺少pcntl扩展

PHP / 970人浏览 / 0人评论

查看hyperf安装版本信息命令:composer info | grep hyperf/framework。启动hyperf命令。php bin/hyperf.php start,启动hyperf报错提示缺少pcntl扩展。

查看hyperf安装版本信息

composer info | grep hyperf/framework

启动hyperf

php bin/hyperf.php start

启动hyperf报错提示缺少扩展

root@8299bedf1863:/www/hyperf_server/shop# composer info | grep hyperf/framework
hyperf/framework                   v2.2.14           A coroutine framework that focuses on hyperspeed and flexibl...
root@8299bedf1863:/www/hyperf_server/shop# php bin/hyperf.php start

Fatal error: Uncaught Hyperf\Di\Exception\Exception: Missing pcntl extension. in /www/hyperf_server/shop/vendor/hyperf/di/src/ScanHandler/PcntlScanHandler.php:21
Stack trace:
#0 /www/hyperf_server/shop/vendor/hyperf/di/src/ClassLoader.php(79): Hyperf\Di\ScanHandler\PcntlScanHandler->__construct()
#1 /www/hyperf_server/shop/bin/hyperf.php(17): Hyperf\Di\ClassLoader::init()
#2 /www/hyperf_server/shop/bin/hyperf.php(23): {closure}()
#3 {main}
  thrown in /www/hyperf_server/shop/vendor/hyperf/di/src/ScanHandler/PcntlScanHandler.php on line 21

php扩展查看

php -m

root@3085a96ef87c:/www/hyperf_server# php -m
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
fileinfo
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mcrypt
mongodb
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
redis
Reflection
session
SimpleXML
sockets
sodium
SPL
sqlite3
standard
swoole
tokenizer
xml
xmlreader
xmlwriter
zlib

[Zend Modules]

docker中pcntl(dockerfile文件中)扩展

RUN docker-php-ext-install pdo pdo_mysql pcntl mysqli

转载注明:

扩展查找

0 条评论

还没有人发表评论

发表评论 取消回复

记住我的信息,方便下次评论
有人回复时邮件通知我