Error running `recode` inside a container

I am running a Fedora container with:

podman run -it

Inside this container, I first install recode:

[root@388e917ba8ce /]# sudo dnf install recode

Then, when trying to execute recode, I get this error:

[root@388e917ba8ce /]# touch deleteme.txt
[root@388e917ba8ce /]# recode windows1251..utf8 deleteme.txt
recode: /deleteme.txt failed: System detected problem in step `CP1251..UTF-8'

What could be causing this error?

Note that, when I run recode in my Fedora 36 system (without containers), I don’t get any errors. Also, if I use an Ubuntu image, I don’t get the error either.

Asked By: Peque


The shared library /usr/lib64/gconv/ provides functionality for the encoding CP1251.

$ podman run -it
[root@ea7d9d4dd16b /]# dnf provides /usr/lib64/gconv/
Fedora 36 - x86_64                                                                                                                                                           17 MB/s |  81 MB     00:04    
Fedora 36 openh264 (From Cisco) - x86_64                                                                                                                                    3.5 kB/s | 2.5 kB     00:00    
Fedora Modular 36 - x86_64                                                                                                                                                  2.0 MB/s | 2.4 MB     00:01    
Fedora 36 - x86_64 - Updates                                                                                                                                                 11 MB/s |  19 MB     00:01    
Fedora Modular 36 - x86_64 - Updates                                                                                                                                        1.8 MB/s | 2.2 MB     00:01    
glibc-gconv-extra-2.35-4.fc36.x86_64 : All iconv converter modules for glibc.
Repo        : fedora
Matched from:
Filename    : /usr/lib64/gconv/

glibc-gconv-extra-2.35-11.fc36.x86_64 : All iconv converter modules for glibc.
Repo        : updates
Matched from:
Filename    : /usr/lib64/gconv/

[root@ea7d9d4dd16b /]# 

The file /usr/lib64/gconv/ is provided by the RPM package glibc-gconv-extra.

After running dnf install -y recode glibc-gconv-extra it seems to work

[root@ea7d9d4dd16b /]# touch deleteme.txt
[root@ea7d9d4dd16b /]# recode windows1251..utf8 deleteme.txt
[root@ea7d9d4dd16b /]#
Answered By: Erik Sjölund
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.