Build failing everytime - Docker/wordpress/mysql/php: The following packages have unmet dependencies:

Since the beginning of May, my wordpress/php/mysql CircleCI build fails every time. Earlier there was no issue with the configuration. Possibly some dependency or source has changed, but I am not finding much on the following error:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.3.0-6 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Exited with code exit status 100

Here’s the complete config.yml:

  version: 2
      - php72-build

version: 2

  mysql_image: &mysql_image

  setup_environment: &setup_environment
    name: "Setup Environment Variables"
    command: |
      echo "export PATH=$HOME/.composer/vendor/bin:$PATH" >> $BASH_ENV
      source /home/circleci/.bashrc

  install_dependencies: &install_dependencies
    name: "Install Dependencies"
    command: |
      sudo apt-get update && sudo apt-get install subversion
      sudo -E docker-php-ext-install mysqli
      sudo sh -c "printf '\ndeb sid main\n' >> /etc/apt/sources.list"
      sudo apt-get update && sudo apt-get install mysql-client-5.7

  php_job: &php_job
      - WP_TESTS_DIR: "/tmp/wordpress-tests-lib"
      - WP_CORE_DIR: "/tmp/wordpress/"
      - checkout
      - run: *setup_environment
      - run: *install_dependencies
      - run:
          name: "Run Tests"
          command: |
            composer global require "phpunit/phpunit=5.7.*"
            composer install
            composer phpcs
            rm -rf $WP_TESTS_DIR $WP_CORE_DIR
            bash bin/ wordpress_test root '' latest
            WP_MULTISITE=1 phpunit

    <<: *php_job
      - image: circleci/php:7.2
      - image: *mysql_image

It appears to fail during the mysql-client build from reviewing the Install Dependencies log.

Thanks for the help!

I took a look. As far as CircleCI’s involvement in the image, we haven’t made any changes in the last month. Since our images are based on the upstream Docker Library images, I checked over there. I saw one change, a change in the download URL of PHP. While it’s possible that caused the issue, I’m not sure and I think it’s less likely.

Lastly, the image you are using is a Debian Buster image but I noticed that you are specifically adding the repository for Debian Sid, otherwise known as Debian Unstable.

sudo sh -c “printf ‘\ndeb sid main\n’ >> /etc/apt/sources.list”

It’s possible the MySQL package from Debian Sid has a new dependency that is not being satisfied.

Thanks for the help!

I removed the repository but had to change the mysql install line to this:

sudo apt-get update && sudo apt-get install default-mysql-client

Some changes in the Sid repository must have broken the dependency trails and removing but using the default client instead of a custom 5.7 client fixed it!

1 Like