我尝试使用Bitbucket为Laravel驱动的项目之一设置管道,并且我已经花了好几个小时试图让它工作,但是无法克服以下问题:
+ composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
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 facebook/webdriver 1.5.0 -> satisfiable by facebook/webdriver[1.5.0].
- facebook/webdriver 1.5.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
Problem 2
- facebook/webdriver 1.5.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/dusk v2.0.8 requires facebook/webdriver ~1.0 -> satisfiable by facebook/webdriver[1.5.0].
- Installation request for laravel/dusk v2.0.8 -> satisfiable by laravel/dusk[v2.0.8].
我的配置文件
image: php:7.2.1
pipelines:
default:
- step:
caches:
- composer
script:
- apt-get update && apt-get install -y unzip
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- apt-get update && apt-get install -qy git curl libmcrypt-dev mysql-client libzip-dev zip
- docker-php-ext-install mcrypt && docker-php-ext-install pdo_mysql && docker-php-ext-install zip
- composer install
- php artisan key:generate
- export CACHE_DRIVER=redis
- export SESSION_DRIVER=redis
- export DB_CONNECTION=mysql
- vendor/bin/phpunit -c phpunit.xml
services:
- mysql
definitions:
services:
mysql:
image: mysql
environment:
MYSQL_DATABASE: 'homestead'
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_USER: 'homestead'
MYSQL_PASSWORD: 'secret'
docker-php-ext-install mcrypt && docker-php-ext-install pdo_mysql && docker-php-ext-install zip
+ docker-php-ext-install mcrypt && docker-php-ext-install pdo_mysql && docker-php-ext-install zip
error: /usr/src/php/ext/mcrypt does not exist
usage: /usr/local/bin/docker-php-ext-install [-jN] ext-name [ext-name ...]
ie: /usr/local/bin/docker-php-ext-install gd mysqli
/usr/local/bin/docker-php-ext-install pdo pdo_mysql
/usr/local/bin/docker-php-ext-install -j5 gd mbstring mysqli pdo pdo_mysql shmop
if custom ./configure arguments are necessary, see docker-php-ext-configure
Possible values for ext-name:
bcmath bz2 calendar ctype curl dba dom enchant exif fileinfo filter ftp gd gettext gmp hash iconv imap interbase intl json ldap mbstring mysqli oci8 odbc opcache pcntl pdo pdo_dblib pdo_firebird pdo_mysql pdo_oci pdo_odbc pdo_pgsql pdo_sqlite pgsql phar posix pspell readline recode reflection session shmop simplexml snmp soap sockets sodium spl standard sysvmsg sysvsem sysvshm tidy tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zend_test zip
Some of the above modules are already compiled into PHP; please check
the output of "php -i" to see which modules are already loaded.
有谁知道可能导致它的原因?
答案 0 :(得分:1)
从输出中清楚可见,docker-php-ext-install mcrypt
命令失败,因为mcrypt
不是可通过docker-php-ext-install
安装的模块,并且脚本该行中的所有后续命令都不会被执行。这意味着未安装zip扩展并导致编写器失败。
尝试从脚本中删除该部分,然后重试