Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem configuring pipelines composer install errors

Mark Stickling
Contributor
May 17, 2018

We're having trouble getting pipelines to work.

We probably just need some help configuring it.

So far we are getting errors on `composer install`

[See attached image]Screen Shot 2018-05-17 at 12.23.06.png

Does anyone have any advice?

Thank you

3 answers

1 accepted

3 votes
Answer accepted
Mark Stickling
Contributor
May 22, 2018

We managed to get a bit further after we found this documentation, which luckily mentions installing php gd on Pipelines part way down. Documentation advises about `docker-php-ext-configure` and `docker-php-ext-install`: https://confluence.atlassian.com/bitbucket/php-with-bitbucket-pipelines-873907835.html

We then managed to also install the php zip extension using `docker-php-ext-install zip`.

Success.

We're now getting errors for other reasons (trying to run Laravel Dusk) but the core issue we created this thread for seems to be resolved.

David Slacalek
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 8, 2021

thanks for pointing to right direction. documentation is bit outdated now, for php8 these settings worked for me

- apt-get update && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev
- docker-php-ext-configure gd --with-freetype --with-jpeg
- docker-php-ext-install -j$(nproc) gd
Farooq AK
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 2, 2022

Thank you for pointing me in right direction 

0 votes
tagnpin_dev1
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 18, 2019

- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer require phpunit/phpunit
- composer install

kaibart
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 25, 2020
docker-php-ext-install pdo_mysql mbstring zip exif pcntl bcmath opcache

Add this before "composer install" in the pipeline respectively in the Script - Section.

Like Roan Brouwer likes this
0 votes
Dr. Christoffer Oleander Nielsen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 17, 2018

As the problem descriptions indicates, you are missing some php extensions.

So you would need to add sudo apt-get install php7.x-extensionname, for each missing extension.

 

I haven't used pipelines, but that seems to be the issue.

Mark Stickling
Contributor
May 21, 2018

Thank you

We'll give this a go.

Mark Stickling
Contributor
May 22, 2018

We tried adding the line:

apt-get install php7.1-gd

But we just get an error:

E: Unable to locate package php7.1-gd
E: Couldn't find any package by regex 'php7.1-gd'

Other posts (not necessarily pipelines posts) mention modifying the php.ini file to enable gd but I don't know where this is in Pipelines.

Mark Stickling
Contributor
May 22, 2018

Full pipelines config being:

# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.

options:
max-time: 7

image
: php:7.1.14

pipelines:
default:
- step:
caches:
- composer
script:
- apt-get update && apt-get install -y unzip
- apt-get install php7.1-gd
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
# - vendor/bin/phpunit

Like Pham Xuan Thinh likes this
Mark Stickling
Contributor
May 22, 2018

It's a Laravel application

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events