I am setting up the sample database for "The Art of PostgreSQL" on RHEL 7.4 and encountered the following error message.
sudo /var/lib/docker/overlay2/3823acd8b0ef0affa0d3f51a46dd03687fe22d70ce0ea785c6ebf33be9518269/diff/usr/local/bin/pgloader mysql:root@localhost/f1db pgsql:///f1db
/var/lib/docker/overlay2/3823acd8b0ef0affa0d3f51a46dd03687fe22d70ce0ea785c6ebf33be9518269/diff/usr/local/bin/pgloader: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /var/lib/docker/overlay2/3823acd8b0ef0affa0d3f51a46dd03687fe22d70ce0ea785c6ebf33be9518269/diff/usr/local/bin/pgloader)
I tried setting LD_LIBRARY_PATH to point to one or both locations of libc.so.6 on the system, one in the OS, and the other in Docker, but that did not work.
You need glibc 2.28 or later to run prebuilt binaries of pgloader. RHEL 7.4 seems to ship 2.17, which is too old; you will either need to upgrade the OS or build pgloader from source.
During "make pgloader", the following error occurred.
debugger invoked on a SB-INT:STREAM-DECODING-ERROR in thread
:ASCII stream decoding error on
#the octet sequence #(194) cannot be decoded.
Which SBCL version are you attempting to build pgloader with? It seems like it's trying to treat UTF-8 text as ASCII.
sbcl.x86_64 1.4.0-1.el7
Sadly, 1.4.0 is from over three years ago (which some Linux distributions consider to be "stable"). Please try building with a newer one.
Thanks phoe, I built sbcl from source and got past that error. Now I have this one:
$ sudo spectool -g -R pgloader.spec
Getting https://github.com/dimitri/pgloader/archive/v3.6.2.tar.gz to /root/rpmbuild/SOURCES/v3.6.2.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 124 100 124 0 0 413 0 --:--:-- --:--:-- --:--:-- 414
Warning: Failed to create the file /root/rpmbuild/SOURCES/v3.6.2.tar.gz: No
Warning: such file or directory
0 3629k 0 616 0 0 1611 0 0:38:27 --:--:-- 0:38:27 1611
curl: (23) Failed writing body (0 != 616)
Wait, I ran the bootstrap-centos7.sh script and got what looks like success...
./build/bin/pgloader --version
pgloader version "3.6.3~devel"
compiled with SBCL 2.0.4
Which SBCL version are you attempting to build pgloader with? It seems like it's trying to treat UTF-8 text as ASCII.
Hi - I'm having the same problem with the docker build:
git checkout https://github.com/dimitri/pgloader.git
cd pgloader
docker build .
Is there something I should be changing to get the newer version?
@benmadin What is your SBCL version?
Having this exact same error from same file when trying to build.
the octet sequence #(194) cannot be decoded.
Anyone having luck?
I guess I'll ask the third person in a row for the third time in this issue.
@adammoisa What is your SBCL version?
Sorry
1.4.16.debain
Please try with a newer SBCL version - 1.4.16 is almost 16 months old. The newest is 2.0.4.
I found a reference to:
Selecting previously unselected package sbcl.
Preparing to unpack .../49-sbcl_2%3a1.4.16-2_amd64.deb ...
Unpacking sbcl (2:1.4.16-2) ...
(It is whatever the debian:stable-slim image referred to in the Dockerfile carries as standard I guess?)
I realise that this may not be the place, but I'm uninitiated in Debian and new to docker ... I'm presuming we need to edit the Dockerfile to make it get a newer package than the release package (at risk of breaking other things I guess)? There appears to be a vast array of ways to do this on stackoverflow, medium, ubuntu, etc, but very little advice on Debian, but a great number of negative comments about how 'not' to do it.
I'd greatly appreciate any advice?
I added a COPY command to line two in the Dockerfile:
1: FROM debian:stable-slim as builder
2: COPY ./conf/sources.list /etc/apt/sources.list.d/
which seems to have helped
@phoe I can confirm forcing an update of the sbcl version in the Dockerfile fixed my issues (runs 2.0.4)
These are the edits I made to the Dockerfile if it can help anyone else.
FROM debian:stable-slim as builder
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
... \
cl-babel \
&& rm -rf /var/lib/apt/lists/*
COPY ./ /opt/src/pgloader
# BEGIN edits
RUN \
wget https://sourceforge.net/projects/sbcl/files/sbcl/2.0.4/sbcl-2.0.4-x86-64-linux-binary.tar.bz2 \
&& bzip2 -cd sbcl-2.0.4-x86-64-linux-binary.tar.bz2 | tar xvf - \
&& cd sbcl-2.0.4-x86-64-linux \
&& sh install.sh
# optional step to show/validate in console that 2.0.4 is installed
RUN sbcl -v
# line added was "&& make clean \" but I am not sure
# it's necessary if either you're running it like this for
# the first time, or you've ran it like this at least once
RUN mkdir -p /opt/src/pgloader/build/bin \
&& cd /opt/src/pgloader \
&& make clean \
&& make
# END edits
FROM debian:stable-slim
RUN apt-get update \
...
In the pgloader project dir, run something like docker build . --tag tagname:1.0
Once built, you can run docker run tagname:1.0
Most helpful comment
@phoe I can confirm forcing an update of the sbcl version in the Dockerfile fixed my issues (runs 2.0.4)
These are the edits I made to the Dockerfile if it can help anyone else.
In the
pgloaderproject dir, run something likedocker build . --tag tagname:1.0Once built, you can run
docker run tagname:1.0