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

dinocajic's avatar

Sail Won’t Start

When running ./vendor/bin/sail up, it just won't work. This is after installing a brand new version using:

curl -s "https://laravel.build/example-app" | bash

cd example-app
 
./vendor/bin/sail up

System

  • MacBook Air
  • Apple M2 Chip
  • macOS: Ventura 13.4.1 (22F82)

Docker

I've gone to the lengths of completely uninstalling and re-installing it

Error that I get

#0 196.1 ## Running `apt-get update` for you...
#0 196.1 
#0 196.1 + apt-get update
#0 196.2 Get:1 https://deb.nodesource.com/node_18.x jammy InRelease [4563 B]
#0 196.3 Get:2 https://deb.nodesource.com/node_18.x jammy/main arm64 Packages [776 B]
#0 196.3 Err:2 https://deb.nodesource.com/node_18.x jammy/main arm64 Packages
#0 196.3   File has unexpected size (778 != 776). Mirror sync in progress? [IP: 23.34.82.11 443]
#0 196.3   Hashes of expected file:
#0 196.3    - Filesize:776 [weak]
#0 196.3    - SHA256:4cdc71073957aaffbea511d99669cc4fa98b752eab966068a023558555e0ab92
#0 196.3    - SHA1:0b9c08bd020fac9bc1d05b3008fe7aeee3d1a182 [weak]
#0 196.3    - MD5Sum:fc5eace817a48e2a439589628112ec00 [weak]
#0 196.3   Release file created at: Thu, 13 Apr 2023 14:12:05 +0000
#0 196.3 Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
#0 196.4 Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
#0 196.5 Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
#0 196.5 Hit:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease
#0 196.6 Hit:7 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
#0 196.7 Fetched 4563 B in 1s (7785 B/s)
#0 196.7 Reading package lists...
#0 197.1 E: Failed to fetch https://deb.nodesource.com/node_18.x/dists/jammy/main/binary-arm64/Packages.gz  File has unexpected size (778 != 776). Mirror sync in progress? [IP: 23.34.82.11 443]
#0 197.1    Hashes of expected file:
#0 197.1     - Filesize:776 [weak]
#0 197.1     - SHA256:4cdc71073957aaffbea511d99669cc4fa98b752eab966068a023558555e0ab92
#0 197.1     - SHA1:0b9c08bd020fac9bc1d05b3008fe7aeee3d1a182 [weak]
#0 197.1     - MD5Sum:fc5eace817a48e2a439589628112ec00 [weak]
#0 197.1    Release file created at: Thu, 13 Apr 2023 14:12:05 +0000
#0 197.1 E: Some index files failed to download. They have been ignored, or old ones used instead.
#0 197.1 Error executing command, exiting
------
failed to solve: process "/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 dnsutils librsvg2-bin     && curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null     && echo \"deb [signed-by=/etc/apt/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main\" > /etc/apt/sources.list.d/ppa_ondrej_php.list     && apt-get update     && apt-get install -y php8.2-cli php8.2-dev        php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-imagick        php8.2-curl        php8.2-imap php8.2-mysql php8.2-mbstring        php8.2-xml php8.2-zip php8.2-bcmath php8.2-soap        php8.2-intl php8.2-readline        php8.2-ldap        php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole        php8.2-memcached php8.2-pcov php8.2-xdebug     && curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer     && curl -sLS 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 | gpg --dearmor | tee /etc/apt/keyrings/yarn.gpg >/dev/null     && echo \"deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main\" > /etc/apt/sources.list.d/yarn.list     && curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/keyrings/pgdg.gpg >/dev/null     && echo \"deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main\" > /etc/apt/sources.list.d/pgdg.list     && apt-get update     && apt-get install -y yarn     && apt-get install -y mysql-client     && apt-get install -y postgresql-client-$POSTGRES_VERSION     && apt-get -y autoremove     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*" did not complete successfully: exit code: 1

Any ideas?

0 likes
7 replies
LaryAI's avatar
Level 58

Based on the error message provided, it seems that there is an issue with the package manager while trying to download the required packages for Sail. This could be due to a temporary issue with the package repository or a network problem.

Here are a few steps you can try to resolve the issue:

  1. Clear the package cache and try again:

    ./vendor/bin/sail build --no-cache
    ./vendor/bin/sail up
    
  2. Update the package manager and try again:

    sudo apt-get update
    ./vendor/bin/sail up
    
  3. If the issue persists, you can try manually installing the required packages:

    sudo apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin
    

    After installing the packages, try running ./vendor/bin/sail up again.

If none of the above solutions work, it's possible that there is an issue with the package repository or your network connection. You can try again later or seek further assistance from the Laravel community or the Sail documentation.

1 like
dinocajic's avatar

Since re-installing Docker, it looks like it's now affecting all of my projects, current and previous. The build --no-cache was also tried without success.

dinocajic's avatar

And now I'm getting the same thing on my Windows Laptop.

dinocajic's avatar

And after a few hours, it just started working by itself

travis.elkins's avatar

@dinocajic I have just run into what seems to be the same problem.

I just upgraded my OS to Ventura 13.4.1 yesterday. I tried the build with --no-cache and when I run sudo apt-get update, I'm told apt-get can't be found.

Any suggestions/advice...?

dinocajic's avatar

@mohamedtammam, I thought it was that too. I tried at from another location and was not successful.

@travis.elkins, right, apt-get is for Linux systems. I personally left it alone and came back a few hours later to give it a shot to try and get it going. I believe that I ran the ./vendor/bin/sail up command without the --no-cache flag and it started to work on both my Windows computer and my Mac.

I haven't tried it today but will shortly.

Please or to participate in this conversation.