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

michalis's avatar

sail build fails

hi guys, when i run sail build --no-cache i get the following error, does anyone know what Im doing wrong?keep in my mind that i've built the docker image with sail successfully on this project many times, I tried to do a new build because I wanted to change the host address and port, but even reverting back to the old values, it still wont build

#7 115.5 Reading state information...
#7 116.0 E: Unable to locate package php8.0-cli
#7 116.0 E: Couldn't find any package by glob 'php8.0-cli'
#7 116.0 E: Couldn't find any package by regex 'php8.0-cli'
#7 116.0 E: Unable to locate package php8.0
#7 116.0 E: Couldn't find any package by glob 'php8.0'
#7 116.0 E: Couldn't find any package by regex 'php8.0'
#7 116.0 E: Unable to locate package php8.0-pgsql
#7 116.0 E: Couldn't find any package by glob 'php8.0-pgsql'
#7 116.0 E: Couldn't find any package by regex 'php8.0-pgsql'
#7 116.0 E: Unable to locate package php8.0-sqlite3
#7 116.0 E: Couldn't find any package by glob 'php8.0-sqlite3'
#7 116.0 E: Couldn't find any package by regex 'php8.0-sqlite3'
#7 116.0 E: Unable to locate package php8.0-gd
#7 116.0 E: Couldn't find any package by glob 'php8.0-gd'
#7 116.0 E: Couldn't find any package by regex 'php8.0-gd'
#7 116.0 E: Unable to locate package php8.0-curl
#7 116.0 E: Couldn't find any package by glob 'php8.0-curl'
#7 116.0 E: Couldn't find any package by regex 'php8.0-curl'
#7 116.0 E: Unable to locate package php8.0-memcached
#7 116.0 E: Couldn't find any package by glob 'php8.0-memcached'
#7 116.0 E: Couldn't find any package by regex 'php8.0-memcached'
#7 116.0 E: Unable to locate package php8.0-imap
#7 116.0 E: Couldn't find any package by glob 'php8.0-imap'
#7 116.0 E: Couldn't find any package by regex 'php8.0-imap'
#7 116.0 E: Unable to locate package php8.0-mysql
#7 116.0 E: Couldn't find any package by glob 'php8.0-mysql'
#7 116.0 E: Couldn't find any package by regex 'php8.0-mysql'
#7 116.0 E: Unable to locate package php8.0-mbstring
#7 116.0 E: Couldn't find any package by glob 'php8.0-mbstring'
#7 116.0 E: Couldn't find any package by regex 'php8.0-mbstring'
#7 116.0 E: Unable to locate package php8.0-xml
#7 116.0 E: Couldn't find any package by glob 'php8.0-xml'
#7 116.0 E: Couldn't find any package by regex 'php8.0-xml'
#7 116.0 E: Unable to locate package php8.0-zip
#7 116.0 E: Couldn't find any package by glob 'php8.0-zip'
#7 116.0 E: Couldn't find any package by regex 'php8.0-zip'
#7 116.0 E: Unable to locate package php8.0-bcmath
#7 116.0 E: Couldn't find any package by glob 'php8.0-bcmath'
#7 116.0 E: Couldn't find any package by regex 'php8.0-bcmath'
#7 116.0 E: Unable to locate package php8.0-soap
#7 116.0 E: Couldn't find any package by glob 'php8.0-soap'
#7 116.0 E: Couldn't find any package by regex 'php8.0-soap'
#7 116.0 E: Unable to locate package php8.0-intl
#7 116.0 E: Couldn't find any package by glob 'php8.0-intl'
#7 116.0 E: Couldn't find any package by regex 'php8.0-intl'
#7 116.0 E: Unable to locate package php8.0-readline
#7 116.0 E: Couldn't find any package by glob 'php8.0-readline'
#7 116.0 E: Couldn't find any package by regex 'php8.0-readline'
#7 116.0 E: Unable to locate package php8.0-pcov
#7 116.0 E: Couldn't find any package by glob 'php8.0-pcov'
#7 116.0 E: Couldn't find any package by regex 'php8.0-pcov'
#7 116.0 E: Unable to locate package php8.0-msgpack
#7 116.0 E: Couldn't find any package by glob 'php8.0-msgpack'
#7 116.0 E: Couldn't find any package by regex 'php8.0-msgpack'
#7 116.0 E: Unable to locate package php8.0-igbinary
#7 116.0 E: Couldn't find any package by glob 'php8.0-igbinary'
#7 116.0 E: Couldn't find any package by regex 'php8.0-igbinary'
#7 116.0 E: Unable to locate package php8.0-ldap
#7 116.0 E: Couldn't find any package by glob 'php8.0-ldap'
#7 116.0 E: Couldn't find any package by regex 'php8.0-ldap'
#7 116.0 E: Unable to locate package php8.0-redis
#7 116.0 E: Couldn't find any package by glob 'php8.0-redis'
#7 116.0 E: Couldn't find any package by regex 'php8.0-redis'
#7 116.0 E: Unable to locate package php8.0-swoole
#7 116.0 E: Couldn't find any package by glob 'php8.0-swoole'
#7 116.0 E: Couldn't find any package by regex 'php8.0-swoole'
#7 116.0 E: Unable to locate package php8.0-xdebug
#7 116.0 E: Couldn't find any package by glob 'php8.0-xdebug'
#7 116.0 E: Couldn't find any package by regex 'php8.0-xdebug'
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/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 wget     && 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/source
s.list.d/ppa_ondrej_php.list     && apt-get update     && apt-get install -y php8.0-cli php8.0            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('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer     && curl -sL https://deb.nodesource.com/setup_$NODE_VE
RSION.x | bash -     && wget http://pear.php.net/go-pear.phar     && php go-pear.phar     && pecl channel-update pecl.php.net     && apt-get install -y nodejs     && 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/*]: exit code: 100
0 likes
18 replies
Sinnbeck's avatar

Seems alot of people are getting that error these past 2 days. Check for other posts about sail and you will see the same error. No one has found a fix yet

michalis's avatar

@Sinnbeck oh I appologize for posting a duplicate thread, I was not getting any results related to my issue through google, so I didn't think to search within the forum itself

Sinnbeck's avatar

@michalis No worries. There is no way you could have known :) I just remember seeing at least 2 posts with the exact same problem.

I am using lando instead of sail, so I dont have the problem myself.

1 like
michalis's avatar

@Sinnbeck on checking the laracasts forum, I can't find other similar posts, are they on a different forum?

Sinnbeck's avatar

@rightwayround No. Neither sail or lando is make for production (lando might change this in the future it seems but I am unsure exactly what the plans are).

But I find it easy to set up, and customize. I know quite alot about docker, and have set up my own traefic proxy to handle traffic before inside of docker. But with lando everything is just alot easier.

Lando is currenly missing a few services compared to sail, but you can add them yourself. I just published a post on how to get started https://sinnbeck.dev/posts/using-lando-to-run-laravel-in-docker

And I will soon publish a new post on how to add more services (horizon, meilisearch and maybe octane)

sidewaysglance's avatar

@Sinnbeck I'm into self hosting, have a few services behind traefik & enjoy & appreciate docker. Used sail a few months back when I first started with Laravel, then moved to Laradock on a proxmox vm, then more recently have been using valet for development which works well too.

Thanks for the link, will give it a read.

Sinnbeck's avatar

@rightwayround yeah valet is awesome :) But I am on linux where it isnt quite as awesome as no mac, so I prefer docker. Happy to share. I find that Lando gives a good middleground to get something up and running fast :)

1 like
timkolm's avatar
timkolm
Best Answer
Level 4

I had a similar problem. The reason was that I have previously ran artisan sail:publish and thus copied the Docker files from vendor folder to my docker folder. Now even though the Docker files got updated in the vendor folder they didn't get updated in the docker folder and I used them. So after running composer update laravel/sail I just copied the changes in the Docker files to the corresp. files in my docker folder. Then the sail build command ran smoothly. These were the changes in my case:

-FROM ubuntu:21.04
+FROM ubuntu:21.10
-     && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu hirsute main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
+    && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu impish main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
-     && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \
+    && php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \
11 likes
monsi's avatar

@timkolm this solved my problem! i have been stuck on this for 3 days

Thank you so much!!!

nsvetozarevic's avatar

@timkolm Yeah these changes to the docker file fixed the issue! Thank you very much! I didn't publish docker files up until now, but had to do it now, hence the error!

Funny thing artisan sail:publish didn't work because the container was not initialized properly, so I had to manually copy them, and change the path in docker-compose.yml.

1 like
jaahvicky's avatar

update the Laravel Sail version by doing a composer update.

Please or to participate in this conversation.