13

Trying to create an image (from a working one) I got this error, been googling the solution but couldn't find a proper one, I asume something's wrong with libraries. Don't fully understand what "Error relocating symbol not found" means, the previous steps ran successfully, this is the error output:

    Executing busybox-1.28.4-r1.trigger
Executing ca-certificates-20171114-r3.trigger
OK: 142 MiB in 67 packages
+ mkdir -p /usr/src/php/ext
+ wget https://pecl.php.net/get/memcached
Error relocating /lib/libssl.so.45: explicit_bzero: symbol not found
Error relocating /lib/libssl.so.45: getentropy: symbol not found
Error relocating /lib/libcrypto.so.43: explicit_bzero: symbol not found
Error relocating /lib/libcrypto.so.43: getentropy: symbol not found
Removing intermediate container e3b8422b922a
The command '/bin/sh -c set -xe && apk add --no-cache py-setuptools git wget bash py-setuptools zlib-dev libpng-dev freetype-dev libjpeg-turbo-dev libmcrypt-dev libmemcached-dev icu-dev libxml2-dev && apk add --no-cache libressl-dev cyrus-sasl-dev --repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ rabbitmq-c-dev gnu-libiconv --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted && mkdir -p /usr/src/php/ext && wget https://pecl.php.net/get/memcached && tar -xf memcached && rm memcached && mv memcached-* /usr/src/php/ext/memcached && wget https://pecl.php.net/get/redis && tar -xf redis && rm redis && mv redis-* /usr/src/php/ext/redis && wget https://pecl.php.net/get/amqp && tar -xf amqp && rm amqp && mv amqp-* /usr/src/php/ext/amqp && wget https://pecl.php.net/get/igbinary && tar -xf igbinary && rm igbinary && mv igbinary-* /usr/src/php/ext/igbinary && wget https://pecl.php.net/get/apcu && tar -xf apcu && rm apcu && mv apcu-* /usr/src/php/ext/apcu && wget https://pecl.php.net/get/mcrypt && tar -xf mcrypt && rm mcrypt && mv mcrypt-* /usr/src/php/ext/mcrypt && git clone --recursive --depth=1 https://github.com/kjdev/php-ext-snappy.git && mv php-ext-snappy /usr/src/php/ext/snappy && docker-php-ext-install pdo_mysql opcache zip pcntl mcrypt iconv soap intl xml amqp igbinary redis snappy apcu && docker-php-ext-configure memcached --enable-memcached-igbinary --disable-memcached-sasl && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install gd memcached && echo 'extension = "apcu.so"' > /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini && echo 'apc.shm_size = 256M' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini' returned a non-zero code: 127

2 Answers 2

12

There are well-documented incompatibilities between the minimal (musl) system C library (libc.so) that ships with Alpine Linux and the bigger (GNU) libc that ships with more typical Linux distributions. Those error messages hint that you're tripping over something like that.

If you're installing 142 MB of development packages you're not really building a "tiny" Docker image, and the easiest fix is to change your image to be based on ubuntu:18.04 instead of the Alpine base it's presumably using now. Your final image will wind up being more like 400 MB than like 200 MB, but it's unlikely you'll notice any practical differences.

5
  • Thanks, but we use this image a lot, so, we'll double the disk space use at the cluster if we change to ubuntu:xxxxx. I fixed changing dl-cdn.alpinelinux.org/alpine/edge/main to dl-cdn.alpinelinux.org/alpine/edge/testing
    – Rancor
    Dec 28, 2018 at 13:36
  • 5
    Launching additional containers off of the same image doesn't require any additional disk space.
    – David Maze
    Dec 28, 2018 at 14:44
  • How is the size of the image relevant? Are you generally discouraging using Alpine? Jun 21, 2019 at 19:44
  • 1
    No, I was mistaken there on the disk usage by images.
    – Rancor
    Jun 22, 2019 at 0:09
  • this apk upgrade musl worked for me.
    – n1nsa1d00
    Nov 18, 2021 at 13:35
3

The solution was changing:

http://dl-cdn.alpinelinux.org/alpine/edge/main

to

http://dl-cdn.alpinelinux.org/alpine/edge/testing

within the /etc/apk/repositories file and then running apk update && apk upgrade.

7
  • 3
    what does it mean? Jun 21, 2019 at 18:57
  • 4
    The path? How does the path concept relate to the terminology in the question? Jun 24, 2019 at 19:40
  • 1
    @PimHeijden Changing the url path in /etc/apk/repositories file Sep 3, 2019 at 7:09
  • 1
    Yes @PimHeijden Sep 3, 2019 at 13:56
  • 2
    According to number of the voites to the answer: only 2 people real understand what is going. :)
    – drFunJohn
    Jun 23, 2021 at 15:05

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.