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]: unable to install jbig2enc (incl. solution) #1452

Closed
3 tasks done
Johan446 opened this issue Jan 1, 2025 · 2 comments
Closed
3 tasks done

[Bug]: unable to install jbig2enc (incl. solution) #1452

Johan446 opened this issue Jan 1, 2025 · 2 comments
Assignees

Comments

@Johan446
Copy link

Johan446 commented Jan 1, 2025

I run into an error installing jbig2enc, and after investigation the dependencies were not installed. See solution below for all errors.

Suggestion is to add/update the instruction to the website (https://ocrmypdf.readthedocs.io/en/latest/jbig2.html#jbig2)

TL/DR:
Run the command above before you install jbig2enc to make sure that the dependencies are installed
sudo apt install -y git libtool libleptonica-dev make libjbig2dec0-dev g++

Explanation:

Error1:
bash: git: command not found
Solution:
sudo apt install -y git
git is a distributed version control system that is widely used for tracking changes in source code during software development. It allows multiple developers to work on a project simultaneously without interfering with each other's changes.

Error2:
Something went wrong, bailing out!
bash: ./configure: No such file or directory
Solution:
sudo apt install -y libtool
libtool is a GNU utility that helps manage the creation and use of shared libraries in a portable way across different operating systems. It provides a consistent interface for building shared libraries, making it easier for developers to create and maintain libraries that can be used in various environments.

Error3:
Error! Leptonica not detected.
Solution:
sudo apt install -y libleptonica-dev
libleptonica-dev is a development package for the Leptonica library, which is an open-source library used for image processing and image analysis. Leptonica provides a wide range of functionalities for handling various image formats, performing image manipulation, and extracting information from images.

Error4:
make: command not found
Solution:
sudo apt install -y make
make is a build automation tool commonly used in software development. It is primarily used to manage the compilation and linking of programs from source code. The tool reads a file called a "Makefile," which contains rules and dependencies for building the software project.

Error5:
make: *** No rule to make target 'install'. Stop.
Solution
sudo apt install -y libjbig2dec0-dev
libjbig2dec0-dev is a development package for the JBIG2 decoder library, which is used for decoding images that are compressed using the JBIG2 (Joint Bi-level Image Experts Group) format. JBIG2 is a standard for compressing bi-level images, such as black-and-white documents, and is often used in applications like document management and faxing.

Error6:
line 1: g++: command not found
Solution:
sudo apt install -y g++
g++ is the GNU C++ Compiler, part of the GNU Compiler Collection (GCC). It is used to compile C++ programs and is widely used in various operating systems, including Linux, macOS, and Windows (via MinGW or Cygwin).

original (current) script
git clone https://github.com/agl/jbig2enc
cd jbig2enc
./autogen.sh
./configure && make
sudo make install

Where are you installing/running from?

Linux package manager (apt, dnf, etc.)

OCRmyPDF version

14.0.1+dfsg1

What operating system are you working on?

Linux

Operating system details and version

debian (clean vm)

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

No response

@Johan446 Johan446 added the triage Issue needs triage label Jan 1, 2025
@Johan446
Copy link
Author

Johan446 commented Jan 1, 2025

there are some instructions for dependencies but they are incomplete
https://ocrmypdf.readthedocs.io/en/latest/jbig2.html#jbig2

the page I found on google that misses info about dependencies is apparently outdated. maybe good to reference to the right page with current information
https://ocrmypdf.readthedocs.io/en/v12.0.0/jbig2.html

@jbarlow83
Copy link
Collaborator

I am planning to create a new library that will make jbig2 integration easier, rather than asking the user to follow more steps. In the meantime, the docker containers are avilable for people who want ocrmypdf with all components included.

@github-actions github-actions bot removed the triage Issue needs triage label Jan 9, 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