Troubleshooting 'pecl install imagick' timeout issues in Bitbucket Pipelines

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

When executing pecl install imagick in Bitbucket Pipelines stalls

Diagnosis

Timeouts in Bitbucket Pipelines when attempting to install the imagick extension using the pecl install imagick command, which causes stalled pipeline.

Cause

The pecl install imagick command expects user input during execution. Because Bitbucket Pipelines runs in a non-interactive mode, the command does not receive the expected input and thus does not proceed, leading to a timeout.

Solution

To resolve this issue, modify the command to run in a non-interactive mode by providing the required input via a pipeline script. This can be done by echoing the input expected by the pecl install command or using yes-piping.

1 yes '' | pecl install imagick-3.7.0

Updated on February 25, 2025

Still need help?

The Atlassian Community is here for you.