paperless-ngx / ansible

Ansible playbooks to set up Paperless-ngx
46 stars 13 forks source link

OS packages missing during installation #17

Closed stevenengland closed 1 year ago

stevenengland commented 1 year ago

Hi there,

it seems that there are missing packages during the installation. Status quo:

- name: install base dependencies
  ansible.builtin.apt:
    update_cache: true
    pkg:
      # paperless-ngx
      - python3-pip
      - python3-dev
      - fonts-liberation
      - imagemagick
      - optipng
      - gnupg
      - libpq-dev
      - libmagic-dev
      - mime-support
      - libzbar0
      - poppler-utils
      # OCRmyPDF
      - unpaper
      - ghostscript
      - icc-profiles-free
      - qpdf
      - liblept5
      - libxml2
      - pngquant
      - zlib1g
      - tesseract-ocr
      # Dev
      - sudo
      - build-essential
      - python3-setuptools
      - python3-wheel
      - python3-venv
      - git
      - python3-jmespath

This differs from the instructions here: https://docs.paperless-ngx.com/setup/#bare_metal

At least I found default-libmysqlclient-dev being a very needed package. Otherwise the pip dependency installation task fails with:

    :stderr:   error: subprocess-exited-with-error

      × python setup.py egg_info did not run successfully.
      │ exit code: 1
      ╰─> [16 lines of output]
          /bin/sh: 1: mysql_config: not found
          /bin/sh: 1: mariadb_config: not found
          /bin/sh: 1: mysql_config: not found
          Traceback (most recent call last):
            File "<string>", line 2, in <module>
            File "<pip-setuptools-caller>", line 34, in <module>
            File "/tmp/pip-install-853bk2d2/mysqlclient_730a1d807bf14991b1f30e4563f4e54b/setup.py", line 15, in <module>
              metadata, options = get_config()
            File "/tmp/pip-install-853bk2d2/mysqlclient_730a1d807bf14991b1f30e4563f4e54b/setup_posix.py", line 70, in get_config
              libs = mysql_config("libs")
            File "/tmp/pip-install-853bk2d2/mysqlclient_730a1d807bf14991b1f30e4563f4e54b/setup_posix.py", line 31, in mysql_config
              raise OSError("{} not found".format(_mysql_config_path))
          OSError: mysql_config not found
          mysql_config --version
          mariadb_config --version
          mysql_config --libs
          [end of output]

      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed

    × Encountered error while generating package metadata.
    ╰─> See above for output.

    note: This is an issue with the package mentioned above, not pip.
stevenengland commented 1 year ago

Solved by #27