Conversation
Due to missing packages the error ``` /app/start.sh: line 22: psql: command not found ``` Appears until we make psql available via `postgresql-contrib`.
|
Thanks |
|
I'm still experiencing this issue with |
|
@rriski Are you using the latest version? Can you try pull the image again just in case? |
|
Yep, latest version. Tried removing the image locally and pulling again. The digest matches the latest image version in Dockerhub sha256:c0645c73a209534740822e55b68acc90c13f8667f5d4e5c3cb7b3af4b997714f so I'm definitely using the latest version. I also built an image from git master and that has the same issue. |
|
Btw what is the context of needing the |
|
It is used in the start.sh script: Line 18 in fa8cf08 |
|
@rriski I've added the correct package in the image that should fix the problem. |
Postgresql client has a dependency to perl and removing perl also removes `psql`
from the container image.
Attached logs from running `apt remove perl` from a container built with this
patch:
root@3c557f7743b3:/# apt remove perl
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libedit2 libgdbm-compat4 libgdbm6 libicu70 libllvm14 libperl5.34 libreadline8 libxml2 libxslt1.1 locales netbase perl-modules-5.34 readline-common ssl-cert tzdata ucf
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
libjson-perl perl postgresql postgresql-14 postgresql-client postgresql-client-14 postgresql-client-common postgresql-common
0 upgraded, 0 newly installed, 8 to remove and 0 not upgraded.
After this operation, 49.2 MB disk space will be freed.
Do you want to continue? [Y/n]
Related to mujx#68
|
The issue is still present and I've narrowed the problem down to the following line: https://github.com/mujx/hakatime/blob/master/Dockerfile.arm#L47 ( #13 [stage-2 2/7] RUN apt-get update -y -qq && apt-get install --no-install-recommends -y netcat libffi-dev libgmp-dev libpq-dev zlib1g-dev postgresql postgresql-client ca-certificates curl && apt-get remove -y perl && apt-get autoremove -y && apt-get autoclean && rm -rf /usr/lib/x86_64-linux-gnu/libLLVM* /usr/lib/x86_64-linux-gnu/libicudata.so*
#13 71.05 Setting up postgresql-client (14+238) ...
#13 71.29 Setting up postgresql (14+238) ...
#13 71.45 Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
#13 71.51 Processing triggers for ca-certificates (20211016ubuntu0.22.04.1) ...
#13 71.53 Updating certificates in /etc/ssl/certs...
#13 72.91 0 added, 0 removed; done.
#13 72.91 Running hooks in /etc/ca-certificates/update.d...
#13 72.91 done.
#13 73.28 Reading package lists...
#13 73.95 Building dependency tree...
#13 74.16 Reading state information...
#13 74.50 The following packages were automatically installed and are no longer required:
#13 74.50 libedit2 libgdbm-compat4 libgdbm6 libicu70 libllvm14 libperl5.34
#13 74.51 libreadline8 libxml2 libxslt1.1 locales netbase perl-modules-5.34
#13 74.51 readline-common ssl-cert tzdata ucf
#13 74.51 Use 'apt autoremove' to remove them.
#13 74.53 The following packages will be REMOVED:
#13 74.53 libjson-perl perl postgresql postgresql-14 postgresql-client
#13 74.53 postgresql-client-14 postgresql-client-common postgresql-common
#13 74.70 0 upgraded, 0 newly installed, 8 to remove and 0 not upgraded.
#13 74.70 After this operation, 49.2 MB disk space will be freed.
(Reading database ... 13329 files and directories currently installed.)
#13 74.73 Removing postgresql (14+238) ...
#13 74.78 Removing postgresql-14 (14.5-0ubuntu0.22.04.1) ...
#13 74.79 invoke-rc.d: could not determine current runlevel
#13 74.80 invoke-rc.d: policy-rc.d denied execution of stop.
#13 75.00 Removing postgresql-common (238) ...
#13 75.05 Removing 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
#13 75.15 Removing libjson-perl (4.04000-1) ...
#13 75.24 Removing postgresql-client (14+238) ...
#13 75.32 Removing postgresql-client-14 (14.5-0ubuntu0.22.04.1) ...
#13 75.41 Removing postgresql-client-common (238) ...
#13 75.47 Removing perl (5.34.0-3ubuntu1.1) ...
#13 75.62 Reading package lists...
#13 76.33 Building dependency tree...
#13 76.50 Reading state information...
#13 76.71 The following packages will be REMOVED:
#13 76.71 libedit2 libgdbm-compat4 libgdbm6 libicu70 libllvm14 libperl5.34
#13 76.71 libreadline8 libxml2 libxslt1.1 locales netbase perl-modules-5.34
#13 76.71 readline-common ssl-cert tzdata ucf
#13 76.88 0 upgraded, 0 newly installed, 16 to remove and 0 not upgraded.
#13 76.88 After this operation, 209 MB disk space will be freedNotice the line "#13 75.24 Removing postgresql-client". Opened a PR with the fix: #71 |
Postgresql client has a dependency to perl and removing perl also removes `psql`
from the container image.
Attached logs from running `apt remove perl` from a container built with this
patch:
root@3c557f7743b3:/# apt remove perl
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libedit2 libgdbm-compat4 libgdbm6 libicu70 libllvm14 libperl5.34 libreadline8 libxml2 libxslt1.1 locales netbase perl-modules-5.34 readline-common ssl-cert tzdata ucf
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
libjson-perl perl postgresql postgresql-14 postgresql-client postgresql-client-14 postgresql-client-common postgresql-common
0 upgraded, 0 newly installed, 8 to remove and 0 not upgraded.
After this operation, 49.2 MB disk space will be freed.
Do you want to continue? [Y/n]
Related to #68
Due to missing packages the error
Appears until we make psql available via
postgresql-contrib.