添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm setting up Docker to run my CakePHP application and my Dockerfile is like

FROM php:7.2-apache
# Enable Apache Rewrite + Expires Module
RUN a2enmod rewrite expires
# Install dependencies
RUN apt-get update && apt-get install -y \
    unzip \
    libfreetype6-dev \
    libjpeg62-turbo-dev \
    libpng-dev \
    libyaml-dev \
    zlib1g-dev \
    libicu-dev \
    g++ \
    git \
    libzip-dev \
    zip \
    && docker-php-ext-install opcache \
    && docker-php-ext-configure intl \
    && docker-php-ext-install intl \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-configure zip --with-libzip \
    && docker-php-ext-install zip \
    && docker-php-ext-install -j$(nproc) gd \
    && docker-php-ext-install zip

But when I run

docker-composer build

It gives me an error like

debconf: delaying package configuration, since apt-utils is not installed

The log is like

After this operation, 1607 kB of additional disk space will be used.
Get:1 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libapt-inst2.0 amd64 1.4.8 [192 kB]
Get:2 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 apt-utils amd64 1.4.8 [410 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 602 kB in 1s (356 kB/s)
Selecting previously unselected package libapt-inst2.0:amd64.
(Reading database ... 13064 files and directories currently installed.)
Preparing to unpack .../libapt-inst2.0_1.4.8_amd64.deb ...

I tried methods specified in GitHub issues and suggestions.

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends apt-utils

and also

RUN apt-get update && apt-get install -y --no-install-recommends apt-utils

But none worked and still, the error is there.

Further running the process gives the following error

/usr/src/php/ext/intl/idn/idn.c: In function 'php_intl_idn_to':
/usr/src/php/ext/intl/idn/idn.c:227:4: warning: 'uidna_IDNToASCII_57' is deprecated [-Wdeprecated-declarations]
    converted_ret_len = uidna_IDNToASCII(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
    ^~~~~~~~~~~~~~~~~
In file included from /usr/include/unicode/platform.h:23:0,
                 from /usr/include/unicode/ptypes.h:50,
                 from /usr/include/unicode/umachine.h:44,
                 from /usr/include/unicode/utypes.h:36,
                 from /usr/include/unicode/uidna.h:20,
                 from /usr/src/php/ext/intl/idn/idn.c:28:
/usr/include/unicode/uidna.h:673:1: note: declared here
 uidna_IDNToASCII(  const UChar* src, int32_t srcLength,
/usr/src/php/ext/intl/idn/idn.c:229:4: warning: 'uidna_IDNToUnicode_57' is deprecated [-Wdeprecated-declarations]
    converted_ret_len = uidna_IDNToUnicode(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
    ^~~~~~~~~~~~~~~~~
In file included from /usr/include/unicode/platform.h:23:0,
                 from /usr/include/unicode/ptypes.h:50,
                 from /usr/include/unicode/umachine.h:44,
                 from /usr/include/unicode/utypes.h:36,
                 from /usr/include/unicode/uidna.h:20,
                 from /usr/src/php/ext/intl/idn/idn.c:28:
/usr/include/unicode/uidna.h:720:1: note: declared here
 uidna_IDNToUnicode(  const UChar* src, int32_t srcLength,
                neither of these are errors -- the first you can probably ignore, and the second you have no control over -- the actual error message is probably further down (if it's failing to build at all)
– anthony sottile
                Nov 27, 2018 at 6:07
                they aren't errors they're warnings -- and yes you shouldn't worry about those -- they're out of your control and shouldn't impact anything
– anthony sottile
                Nov 27, 2018 at 18:23

Using DEBIAN_FRONTEND=noninteractive apt-get -yq install {your-pkgs} instead of apt-get -yq install {your-pkgs} should resolve the problem.

Refer https://stackoverflow.com/a/56569081/12782026 for details.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.