phpenv如何对待模块

时间:2018-05-17 13:23:26

标签: php module

我使用由phpenv安装的php 5.6.10。

当我使用capistorano部署我的symfony2项目时。

它显示了这样的错误。

$ cap production deploy
.
.
.
The deploy has failed with an error: Exception while executing as app@ars.example.com: composer exit status: 2
composer stdout: Nothing written
composer stderr: Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for php-amqplib/php-amqplib v2.7.2 -> satisfiable by php-amqplib/php-amqplib[v2.7.2].
    - php-amqplib/php-amqplib v2.7.2 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
  Problem 2
    - php-amqplib/php-amqplib v2.7.2 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
    - enqueue/amqp-lib 0.8.23 requires php-amqplib/php-amqplib ^2.7@dev -> satisfiable by php-amqplib/php-amqplib[v2.7.2].
    - Installation request for enqueue/amqp-lib 0.8.23 -> satisfiable by enqueue/amqp-lib[0.8.23].

  To enable extensions, verify that they are enabled in your .ini files:
  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php.ini
    - /etc/php.d/10-opcache.ini
    - /etc/php.d/15-xdebug.ini
    - /etc/php.d/20-bz2.ini
    - /etc/php.d/20-calendar.ini
    - /etc/php.d/20-ctype.ini
    - /etc/php.d/20-curl.ini
    - /etc/php.d/20-dom.ini
    - /etc/php.d/20-exif.ini
    - /etc/php.d/20-fileinfo.ini
    - /etc/php.d/20-ftp.ini
    - /etc/php.d/20-gettext.ini
    - /etc/php.d/20-iconv.ini
    - /etc/php.d/20-intl.ini
    - /etc/php.d/20-mbstring.ini
    - /etc/php.d/20-mcrypt.ini
    - /etc/php.d/20-mysqlnd.ini
    - /etc/php.d/20-pdo.ini
    - /etc/php.d/20-phar.ini
    - /etc/php.d/20-posix.ini
    - /etc/php.d/20-shmop.ini
    - /etc/php.d/20-simplexml.ini
    - /etc/php.d/20-soap.ini
    - /etc/php.d/20-sockets.ini
    - /etc/php.d/20-sqlite3.ini
    - /etc/php.d/20-sysvmsg.ini
    - /etc/php.d/20-sysvsem.ini
    - /etc/php.d/20-sysvshm.ini
    - /etc/php.d/20-tokenizer.ini
    - /etc/php.d/20-xml.ini
    - /etc/php.d/20-xmlwriter.ini
    - /etc/php.d/20-xsl.ini
    - /etc/php.d/30-mysql.ini
    - /etc/php.d/30-mysqli.ini
    - /etc/php.d/30-pdo_mysql.ini
    - /etc/php.d/30-pdo_sqlite.ini
    - /etc/php.d/30-wddx.ini
    - /etc/php.d/30-xmlreader.ini
    - /etc/php.d/40-json.ini
    - /etc/php.d/40-xhprof.ini
    - /etc/php.d/40-zip.ini

我的php版本是这样的

$ php -v
PHP 5.6.10 (cli) (built: May 16 2018 11:44:37) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

$ php --ini
Configuration File (php.ini) Path: /Users/whitebear/.phpenv/versions/5.6.10/etc
Loaded Configuration File:         /Users/whitebear/.phpenv/versions/5.6.10/etc/php.ini
Scan for additional .ini files in: /Users/whitebear/.phpenv/versions/5.6.10/etc/conf.d
Additional .ini files parsed:      /Users/whitebear/.phpenv/versions/5.6.10/etc/conf.d/xdebug.ini

我认为这是因为未正确加载模块。

但是,我检查了我的模块,看起来我的模块已加载。

我该怎么做才能解决?

$ php -m

[PHP Modules]
bcmath
bz2
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
hash
iconv
intl
json
libxml
mbstring
mcrypt
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvsem
sysvshm
tidy
tokenizer
xdebug
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Xdebug
Zend OPcache

0 个答案:

没有答案