# Update package list | |
apt-get update | |
# Install Tesseract OCR | |
apt-get install -y tesseract-ocr | |
# Install Poppler for PDF processing | |
apt-get install -y poppler-utils | |
# Remove the outdated Ghostscript version | |
apt-get remove -y ghostscript | |
# Download and install a newer Ghostscript version | |
wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs1003/ghostscript-10.03.0-linux-x86_64.tgz | |
tar -xvzf ghostscript-10.03.0-linux-x86_64.tgz | |
mv ghostscript-10.03.0-linux-x86_64/gs-1003-linux-x86_64 /usr/local/bin/gs | |
# Verify installation | |
gs --version | |