Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Toskan's avatar

sail build fails

I run ubuntu 18.04 Im having problems with laravel sail thus when running: ./vendor/bin/sail build --no-cache

I get

Hit:5 http://archive.ubuntu.com/ubuntu hirsute-backports InRelease
Fetched 23.9 kB in 0s (57.7 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package php8.0-cli
E: Couldn't find any package by glob 'php8.0-cli'
E: Couldn't find any package by regex 'php8.0-cli'
E: Unable to locate package php8.0-dev
E: Couldn't find any package by glob 'php8.0-dev'
E: Couldn't find any package by regex 'php8.0-dev'
E: Unable to locate package php8.0-pgsql
E: Couldn't find any package by glob 'php8.0-pgsql'
E: Couldn't find any package by regex 'php8.0-pgsql'
E: Unable to locate package php8.0-sqlite3
E: Couldn't find any package by glob 'php8.0-sqlite3'
E: Couldn't find any package by regex 'php8.0-sqlite3'
E: Unable to locate package php8.0-gd
E: Couldn't find any package by glob 'php8.0-gd'
E: Couldn't find any package by regex 'php8.0-gd'
E: Unable to locate package php8.0-curl
E: Couldn't find any package by glob 'php8.0-curl'
E: Couldn't find any package by regex 'php8.0-curl'
E: Unable to locate package php8.0-memcached
E: Couldn't find any package by glob 'php8.0-memcached'
E: Couldn't find any package by regex 'php8.0-memcached'
E: Unable to locate package php8.0-imap
E: Couldn't find any package by glob 'php8.0-imap'
E: Couldn't find any package by regex 'php8.0-imap'
E: Unable to locate package php8.0-mysql
E: Couldn't find any package by glob 'php8.0-mysql'
E: Couldn't find any package by regex 'php8.0-mysql'
E: Unable to locate package php8.0-mbstring
E: Couldn't find any package by glob 'php8.0-mbstring'
E: Couldn't find any package by regex 'php8.0-mbstring'
E: Unable to locate package php8.0-xml
E: Couldn't find any package by glob 'php8.0-xml'
E: Couldn't find any package by regex 'php8.0-xml'
E: Unable to locate package php8.0-zip
E: Couldn't find any package by glob 'php8.0-zip'
E: Couldn't find any package by regex 'php8.0-zip'
E: Unable to locate package php8.0-bcmath
E: Couldn't find any package by glob 'php8.0-bcmath'
E: Couldn't find any package by regex 'php8.0-bcmath'
E: Unable to locate package php8.0-soap
E: Couldn't find any package by glob 'php8.0-soap'
E: Couldn't find any package by regex 'php8.0-soap'
E: Unable to locate package php8.0-intl
E: Couldn't find any package by glob 'php8.0-intl'
E: Couldn't find any package by regex 'php8.0-intl'
E: Unable to locate package php8.0-readline
E: Couldn't find any package by glob 'php8.0-readline'
E: Couldn't find any package by regex 'php8.0-readline'
E: Unable to locate package php8.0-pcov
E: Couldn't find any package by glob 'php8.0-pcov'
E: Couldn't find any package by regex 'php8.0-pcov'
E: Unable to locate package php8.0-msgpack
E: Couldn't find any package by glob 'php8.0-msgpack'
E: Couldn't find any package by regex 'php8.0-msgpack'
E: Unable to locate package php8.0-igbinary
E: Couldn't find any package by glob 'php8.0-igbinary'
E: Couldn't find any package by regex 'php8.0-igbinary'
E: Unable to locate package php8.0-ldap
E: Couldn't find any package by glob 'php8.0-ldap'
E: Couldn't find any package by regex 'php8.0-ldap'
E: Unable to locate package php8.0-redis
E: Couldn't find any package by glob 'php8.0-redis'
E: Couldn't find any package by regex 'php8.0-redis'
E: Unable to locate package php8.0-swoole
E: Couldn't find any package by glob 'php8.0-swoole'
E: Couldn't find any package by regex 'php8.0-swoole'
E: Unable to locate package php8.0-xdebug
E: Couldn't find any package by glob 'php8.0-xdebug'
E: Couldn't find any package by regex 'php8.0-xdebug'
The command '/bin/sh -c apt-get update     && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2     && mkdir -p ~/.gnupg     && chmod 600 ~/.gnupg     && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf     && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C     && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C     && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu hirsute main" > /etc/apt/sources.list.d/ppa_ondrej_php.list     && apt-get update     && apt-get install -y php8.0-cli php8.0-dev        php8.0-pgsql php8.0-sqlite3 php8.0-gd        php8.0-curl php8.0-memcached        php8.0-imap php8.0-mysql php8.0-mbstring        php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap        php8.0-intl php8.0-readline php8.0-pcov        php8.0-msgpack php8.0-igbinary php8.0-ldap        php8.0-redis php8.0-swoole php8.0-xdebug     && php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer     && curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash -     && apt-get install -y nodejs     && npm install -g npm     && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -     && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list     && apt-get update     && apt-get install -y yarn     && apt-get install -y mysql-client     && apt-get install -y postgresql-client     && apt-get -y autoremove     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*' returned a non-zero code: 100
ERROR: Service 'laravel.test' failed to build : Build failed

my docker-compose file:

version: '3'
services:
    laravel.test:
        build:
            context: ./vendor/laravel/sail/runtimes/8.0
            dockerfile: Dockerfile
            args:
                WWWGROUP: '${WWWGROUP}'
        image: sail-8.0/app
        ports:
            - '${APP_PORT:-80}:80'
        environment:
            WWWUSER: '${WWWUSER}'
            LARAVEL_SAIL: 1
        volumes:
            - '.:/var/www/html'
        networks:
            - sail
        depends_on:
            - mysql
            - redis
    mysql:
        image: 'mysql:8.0'
        ports:
            - '${FORWARD_DB_PORT:-33006}:3306'
        environment:
            MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
            MYSQL_DATABASE: '${DB_DATABASE}'
            MYSQL_USER: '${DB_USERNAME}'
            MYSQL_PASSWORD: '${DB_PASSWORD}'
            MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
        volumes:
            - 'sailmysql:/var/lib/mysql'
        networks:
            - sail
    redis:
        image: 'redis:alpine'
        ports:
            - '${FORWARD_REDIS_PORT:-6379}:6379'
        volumes:
            - 'sailredis:/data'
        networks:
            - sail
    mailhog:
        image: 'mailhog/mailhog:latest'
        ports:
            - 1025:1025
            - 8025:8025
        networks:
            - sail
networks:
    sail:
        driver: bridge
volumes:
    sailmysql:
        driver: local
    sailredis:
        driver: local
0 likes
3 replies
Sinnbeck's avatar

It might be having problems currently. I saw another post with the exact same problem. I personally use lando instead :)

monsi's avatar

try this:

  • update sail to the latest version
  • check if the folders inside docker folder have been updated with the latest version, if not you can update them using the files in /vendor/laravel/sail/runtimes

then run again sail build --no-cache

This solved the problem for me

Please or to participate in this conversation.