0

我正在尝试wkhtmltopdf通过 Laravel Sail 安装在 docker 上。我以前在Laravel Homestead. 我已按照说明指南进行操作。但是当我运行时,sail build --no-cache我得到了以下错误:

failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apt-get update     && apt-get install -y xfonts-75dpi wget     && wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb     && apt install -y ./wkhtmltox_0.12.6-1.focal_amd64.deb     && rm ./wkhtmltox_0.12.6-1.focal_amd64.debRUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.0]: exit code: 1

stacktrace 的最后几行显示了这些错误:

#8 12.38 Preparing to unpack .../xfonts-base_1%3a1.0.5_all.deb ...
#8 12.38 Unpacking xfonts-base (1:1.0.5) ...
#8 12.80 Selecting previously unselected package wkhtmltox.
#8 12.81 Preparing to unpack .../wkhtmltox_0.12.6-1.focal_amd64.deb ...
#8 12.81 Unpacking wkhtmltox (1:0.12.6-1.focal) ...
#8 15.18 Setting up fontconfig (2.13.1-4.2ubuntu3) ...
#8 15.19 Regenerating fonts cache... done.
#8 18.36 Setting up libxrender1:amd64 (1:0.9.10-1build2) ...
#8 18.38 Setting up xfonts-base (1:1.0.5) ...
#8 18.46 Setting up wkhtmltox (1:0.12.6-1.focal) ...
#8 18.49 Processing triggers for man-db (2.9.4-2) ...
#8 18.54 Processing triggers for libc-bin (2.33-0ubuntu5) ...
#8 18.59 rm: cannot remove './wkhtmltox_0.12.6-1.focal_amd64.debRUN': No such file or directory
#8 18.59 rm: cannot remove 'setcap': No such file or directory
#8 18.59 rm: cannot remove 'cap_net_bind_service=+ep': No such file or directory

完整日志可在此处获得: https ://pastebin.com/BpZ3N8ZF

任何建议我如何解决这个问题。

4

1 回答 1

1

您需要在此处发布您的 Dockerfile。我强烈怀疑它的格式不正确

rm:无法删除'./wkhtmltox_0.12.6-1.focal_amd64.debRUN

看到RUN最后了吗?那不应该在那里

于 2021-08-12T02:11:23.343 回答