【发布时间】:2021-10-07 16:58:57
【问题描述】:
我已经完成了laravel.com/docs/8.x/installation 文档中的步骤。一切都已下载并设置完毕。
然后我输入:
curl -s https://laravel.build/example-app | bash
进入 Ubuntu。一切顺利,它加载并完成。然后我输入:
cd example-app
./vendor/bin/sail up
但是,这会失败并出现以下错误:
⠿ laravel.test Error 3.0s
[+] Building 51.4s (9/16)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:21.04 1.2s
=> [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 99B 0.0s
=> [ 1/11] FROM docker.io/library/ubuntu:21.04@sha256:cc6f342e3aad515ae49ec9355d852bbba50c3d63e57786438ec36d8989 0.0s
=> CACHED [ 2/11] WORKDIR /var/www/html 0.0s
=> CACHED [ 3/11] RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone 0.0s
**=> ERROR [ 4/11] RUN apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git sup 50.2s**
有更多的行(500 左右),但这是主要错误。
对于可能出现的问题有什么建议吗?我在错误中找不到任何内容,并且所有内容都已更新。
这些是失败的行(无法将其添加到 cmets)
#8 49.88 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/s/shared-mime-info/shared-mime-info_2.0-1_amd64.deb Bad header line Bad header data [IP: 91.189.88.152 80]
#8 49.88 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-defaults/cpp_10.3.0-1ubuntu1_amd64.deb Bad header line Bad header data [IP: 91.189.88.142 80]
#8 49.88 E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-defaults/gcc_10.3.0-1ubuntu1_amd64.deb 0 [IP: 91.189.88.152 80]
#8 49.88 E: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/p/php8.0/php8.0-dev_8.0.11-1%2bubuntu21.04.1%2bdeb.sury.org%2b1_amd64.deb Undetermined Error [IP: 91.189.95.85 80]
#8 49.88 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
------
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 && 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('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL https://deb.nodesource.com/setup_16.x | bash - && 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
【问题讨论】:
-
请将错误作为文本而不是图像。
-
可能是
ERROR行中的命令之一失败,我希望您有日志可以查看发生了什么? -
将它们添加到帖子底部
标签: php laravel docker ubuntu compiler-errors