John Davidson

php - Laravel Sails Service 'laravel.test' failed to build

0 comments
Message:


I'm having issues getting Laravel Sail to work on new laravel 8 project, I'm on Ubuntu 20.04 LTS , i followed the instructions as explained on Laravel Sails Documentation


What i did so far was :


First i created a new Laravel Project :


composer create-project --prefer-dist laravel/laravel blog

Then installed sails :


composer require laravel/sail --dev

Published sails's docker-compose.yml :


php artisan sail:install

Finally started sails :


./vendor/bin/sail up 

But i'm getting this error :


ERROR: Service 'laravel.test' failed to build

This is the complete error message :


Pulling mysql (mysql/mysql-server:8.0)...
8.0: Pulling from mysql/mysql-server
639d1bdfca05: Pull complete
9e100c7b198d: Pull complete
427d2cdb963c: Pull complete
4436dc023066: Pull complete
5800f7888dd1: Pull complete
798cd8b6d3ec: Pull complete
c5ce8d5cf40e: Pull complete
Digest: sha256:91170bd4e012f0bf46b5141a38b612427b37692e8465cdffe9b0ca2d74d37d8a
Status: Downloaded newer image for mysql/mysql-server:8.0
Building laravel.test
Step 1/18 : FROM ubuntu:21.04
21.04: Pulling from library/ubuntu
9e6a0d5477cf: Pull complete
Digest: sha256:93a94c12448f393522f44d8a1b34936b7f76890adea34b80b87a245524d1d574
Status: Downloaded newer image for ubuntu:21.04
---> d662230a2592
Step 2/18 : LABEL maintainer="Taylor Otwell"
---> Running in 89940512e780
Removing intermediate container 89940512e780
---> 2b6050bc73a0
Step 3/18 : ARG WWWGROUP
---> Running in c33ba5cd161c
Removing intermediate container c33ba5cd161c
---> cd665779f65a
Step 4/18 : ARG NODE_VERSION=16
---> Running in 1fab74b70fc7
Removing intermediate container 1fab74b70fc7
---> 9fc2b36920f3
Step 5/18 : WORKDIR /var/www/html
---> Running in 53a071a9db21
Removing intermediate container 53a071a9db21
---> cd9c5c32babc
Step 6/18 : ENV DEBIAN_FRONTEND noninteractive
---> Running in a9e045bff55e
Removing intermediate container a9e045bff55e
---> 0cc113458364
Step 7/18 : ENV TZ=UTC
---> Running in 9827c7d2f5e1
Removing intermediate container 9827c7d2f5e1
---> 0f209195f47a
Step 8/18 : RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
---> Running in ccafa5e32e94
Removing intermediate container ccafa5e32e94
---> b58053a83ede
Step 9/18 : RUN 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.1-cli php8.1-dev php8.1-pgsql php8.1-sqlite3 php8.1-gd php8.1-curl php8.1-imap php8.1-mysql php8.1-mbstring php8.1-xml php8.1-zip php8.1-bcmath php8.1-soap php8.1-intl php8.1-readline php8.1-ldap php8.1-msgpack php8.1-igbinary php8.1-redis php8.1-swoole php8.1-memcached php8.1-pcov php8.1-xdebug && php -r "readfile('http://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/*
---> Running in 279bb38a60ad
Err:1 http://archive.ubuntu.com/ubuntu hirsute InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu hirsute-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu hirsute-backports InRelease
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists...
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/hirsute/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/hirsute-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/hirsute-backports/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/hirsute-security/InRelease Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
Package ca-certificates is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package gnupg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'gnupg' has no installation candidate
E: Unable to locate package gosu
E: Unable to locate package curl
E: Package 'ca-certificates' has no installation candidate
E: Unable to locate package zip
E: Unable to locate package unzip
E: Unable to locate package git
E: Unable to locate package supervisor
E: Unable to locate package sqlite3
E: Unable to locate package libcap2-bin
E: Unable to locate package libpng-dev
E: Unable to locate package python2
ERROR: Service 'laravel.test' failed to build: 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.1-cli php8.1-dev php8.1-pgsql php8.1-sqlite3 php8.1-gd php8.1-curl php8.1-imap php8.1-mysql php8.1-mbstring php8.1-xml php8.1-zip php8.1-bcmath php8.1-soap php8.1-intl php8.1-readline php8.1-ldap php8.1-msgpack php8.1-igbinary php8.1-redis php8.1-swoole php8.1-memcached php8.1-pcov php8.1-xdebug && php -r "readfile('http://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

Any idea on why i'm getting this error, and how i can solve it ?



My Answer:
Laravel Sails is a service provided by Laravel that allows developers to easily deploy their Laravel applications to a server without having to worry about server configuration or management. With Laravel Sails, developers can quickly deploy their applications to a server with just a few simple commands.

To use Laravel Sails, you first need to install the Laravel installer by running the following command:


composer global require laravel/installer


Next, you can create a new Laravel project by running the following command:


laravel new project-name


Once you have created your Laravel project, you can deploy it to a server using Laravel Sails by running the following command:


sail up


This will start the Laravel Sails service and deploy your application to a server. You can then access your application in a web browser by visiting the server's IP address or domain name.

Overall, Laravel Sails is a convenient service provided by Laravel that simplifies the process of deploying Laravel applications to a server.

Rate this post

3 of 5 based on 5598 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us