sh: rar: not found

by on Mar.02, 2023, under News

If you get this error message in a Docker or Kubernetes setup even though you made sure that rar is in the PATH and executable (chmod +x) it’s probably a libc related issue.

We may use the command ldd to get the shared objects (shared libraries) required by each program or shared object specified on the command line:

ldd rar

The command will print something similar to: (0x00007ffcd9b68000) => /usr/lib/x86_64-linux-gnu/ (0x00007f8f83899000) => /lib/x86_64-linux-gnu/ (0x00007f8f83755000) => /lib/x86_64-linux-gnu/ (0x00007f8f8373b000) => /lib/x86_64-linux-gnu/ (0x00007f8f83719000) => /lib/x86_64-linux-gnu/ (0x00007f8f83544000)
/lib64/ (0x00007f8f83a77000)

If your container image is based on alpine:latest or similar, the easiest fix is to switch to another distribution containing the gnu libgcc / libstdc++

FROM debian:latest

Alternatively, if you’d like to stick with alpine, update your Dockerfile to install libstdc++

apk add –no-cache libstdc++


Leave a Reply


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!