Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: tesseract: symbol lookup error: /lib64/libwebpmux.so.3: undefined symbol: WebPMalloc (Fedora 41) #1480

Closed
3 tasks done
rjohnsonbade opened this issue Feb 19, 2025 · 1 comment
Assignees

Comments

@rjohnsonbade
Copy link

What were you trying to do?

Hello,

I understand this is related to an upstream dependency, but I only found an old Google Groups forum for tesseract and it seemed very dead (last post 2020).

I have just done an install of OCRmyPDF on my Fedora Workstation 41, and unfortunately it is throwing an error when I try to run it due to tesseract.

Command '['tesseract', '--version']' returned non-zero exit status 127.                               __init__.py:174
Traceback (most recent call last):                                                                                   
  File "/usr/lib/python3.13/site-packages/ocrmypdf/subprocess/__init__.py", line 158, in get_version                 
    proc = run(                                                                                                      
        args_prog,                                                                                                   
    ...<5 lines>...                                                                                                  
        env=env,                                                                                                     
    )                                                                                                                
  File "/usr/lib/python3.13/site-packages/ocrmypdf/subprocess/__init__.py", line 62, in run                          
    proc = subprocess_run(args, env=env, check=check, **kwargs)                                                      
  File "/usr/lib64/python3.13/subprocess.py", line 579, in run                                                       
    raise CalledProcessError(retcode, process.args,                                                                  
                             output=stdout, stderr=stderr)                                                           
subprocess.CalledProcessError: Command '['tesseract', '--version']' returned non-zero exit status                    
127.                                                                                                                 
                                                                                                      __init__.py:279
The program 'tesseract' could not be executed or was not found on your                                               
system PATH.                                                                                                         
                                                                                                                     
                                                                                                      __init__.py:265
On systems with the aptitude package manager (Debian, Ubuntu), try these                                             
commands:                                                                                                            
    sudo apt update                                                                                                  
    sudo apt install tesseract-ocr                                                                                   
                                                                                                                     
On RPM-based systems (Red Hat, Fedora), try this command:                                                            
    sudo dnf install tesseract-ocr                                                                                   
                                                                                                                     
Ran program 'tesseract' but it exited with an error:                                                   __main__.py:68
tesseract: symbol lookup error: /lib64/libwebpmux.so.3: undefined symbol: WebPMalloc                                                                                                                                                   

I tried sudo dnf install tesseract-ocr, however this looks like the wrong package name for Fedora

russjb@fedora:~/Downloads$ sudo dnf install tesseract-ocr
Updating and loading repositories:
Repositories loaded.
Failed to resolve the transaction:
No match for argument: tesseract-ocr

Changing to sudo dnf install tesseract works, but it says it's already installed.

russjb@fedora:~/Downloads$ sudo dnf install tesseract
Updating and loading repositories:
Repositories loaded.
Package "tesseract-5.4.1-5.fc41.x86_64" is already installed.

Nothing to do.

I've also tried removing OCRmyPDF and reinstalling, but to no avail.

Where are you installing/running from?

Linux package manager (apt, dnf, etc.)

OCRmyPDF version

16.7.0

What operating system are you working on?

Linux

Operating system details and version

Fedora 41 (Kernel 6.12.13-200.fc41.x86_64)

Simple sanity checks

  • Operating system is currently supported by its vendor (not end of life)
  • Python version is compatible with OCRmyPDF
  • This issue is not about a specific input file

Relevant log output

Command '['tesseract', '--version']' returned non-zero exit status 127.                               __init__.py:174
Traceback (most recent call last):                                                                                   
  File "/usr/lib/python3.13/site-packages/ocrmypdf/subprocess/__init__.py", line 158, in get_version                 
    proc = run(                                                                                                      
        args_prog,                                                                                                   
    ...<5 lines>...                                                                                                  
        env=env,                                                                                                     
    )                                                                                                                
  File "/usr/lib/python3.13/site-packages/ocrmypdf/subprocess/__init__.py", line 62, in run                          
    proc = subprocess_run(args, env=env, check=check, **kwargs)                                                      
  File "/usr/lib64/python3.13/subprocess.py", line 579, in run                                                       
    raise CalledProcessError(retcode, process.args,                                                                  
                             output=stdout, stderr=stderr)                                                           
subprocess.CalledProcessError: Command '['tesseract', '--version']' returned non-zero exit status                    
127.                                                                                                                 
                                                                                                      __init__.py:279
The program 'tesseract' could not be executed or was not found on your                                               
system PATH.                                                                                                         
                                                                                                                     
                                                                                                      __init__.py:265
On systems with the aptitude package manager (Debian, Ubuntu), try these                                             
commands:                                                                                                            
    sudo apt update                                                                                                  
    sudo apt install tesseract-ocr                                                                                   
                                                                                                                     
On RPM-based systems (Red Hat, Fedora), try this command:                                                            
    sudo dnf install tesseract-ocr                                                                                   
                                                                                                                     
Ran program 'tesseract' but it exited with an error:                                                   __main__.py:68
tesseract: symbol lookup error: /lib64/libwebpmux.so.3: undefined symbol: WebPMalloc
@rjohnsonbade rjohnsonbade added the triage Issue needs triage label Feb 19, 2025
@jbarlow83
Copy link
Collaborator

This would be related to how Fedora provides the Tesseract package and is independent of ocrmypdf. I can't do anything to fix it.

@jbarlow83 jbarlow83 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2025
@github-actions github-actions bot removed the triage Issue needs triage label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants