Cannot install bcMath in to php image

I am trying to get a container to run laravel and the unit tests. but when i run composer update it says

  • moontoast/math 1.1.2 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.

I have tried to install bcMath using

sudo apt-get install php7.2-bcmath

but it says

E: Package ‘php7.2-bcmath’ has no installation candidate

this is my config.yml

# PHP CircleCI 2.0 configuration file
# Check for more details
version: 2
    # Specify the version you desire here
    - image: circleci/php:7.2.10-fpm-stretch

    # Specify service dependencies here if necessary
    # CircleCI maintains a library of pre-built images
    # documented at
    # Using the RAM variation mitigates I/O contention
    # for database intensive operations.
    # - image: circleci/mysql:5.7-ram
    # - image: redis:2.8.19


    - run: sudo rm -rf /var/lib/apt/lists/*
    - run: sudo apt update && sudo apt install zlib1g-dev libsqlite3-dev
    - run: sudo docker-php-ext-install zip

    - checkout
    # Download and cache dependencies

    # composer cache
    - restore_cache:
        # "composer.lock" can be used if it is committed to the repo
        - v1-dependencies-{{ checksum "composer.json" }}
        # fallback to using the latest cache if no exact match is found
        - v1-dependencies-

    - run: composer install -n --prefer-dist

    - save_cache:
        key: composer-v1-{{ checksum "composer.lock" }}
        - vendor

    # node cache

    - restore_cache:
        - node-v3-{{ checksum "package.json" }}
        - node-v3-
    - run: yarn install
    - save_cache:
        key: node-v3-{{ checksum "package.json" }}
        - node_modules
        - ~/.yarn

    # prepare the database
    - run: touch storage/testing.sqlite
    - run: php artisan migrate --env=testing --database=sqlite_testing --force

    # run tests with phpunit or codecept
    - run: ./vendor/bin/phpunit
    - store_test_results:
        path: tests/_output
    - store_artifacts:
        path: tests/_output

^ To format Markdown, place backticks around your material, like so:

yaml goes here

Would you edit your post?

done, but it does not seem to have made a difference.

Refresh the page - it is fine. The software we’re using is called Discourse, which is one of the best web-based forums on the market. The odds of it having a bug in its Markdown parser is pretty slim :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.