modoboa / modoboa-installer

An installer for Modoboa
MIT License
262 stars 138 forks source link

First install: Failed to get version of modoboa. Output is: b'WARNING: Package(s) not found: modoboa\n' #518

Closed seco35 closed 7 months ago

seco35 commented 1 year ago

Impacted versions

Steps to reproduce

Follow instructions on readme. With following configuration:

[certificate] 
type = letsencrypt
generate= false

[database]
engine=mysql
host=127.0.0.1
install=false

[mysql]
user =root
password =MYROOTPASSWORDHERE
charset = utf8
collation = utf8_general_ci

Full trace using --debug option or current behaviour

Stacktrace
Installing modoboa Reading package lists... Building dependency tree... Reading state information... build-essential is already the newest version (12.9ubuntu3). cron is already the newest version (3.0pl1-137ubuntu3). libcairo2-dev is already the newest version (1.16.0-5ubuntu2). libffi-dev is already the newest version (3.4.2-4). libjpeg-dev is already the newest version (8c-2ubuntu10). librrd-dev is already the newest version (1.7.2-3ubuntu6). pkg-config is already the newest version (0.29.2-1ubuntu3). rrdtool is already the newest version (1.7.2-3ubuntu6). redis-server is already the newest version (5:6.0.16-1ubuntu1). supervisor is already the newest version (4.2.1-1ubuntu1). libssl-dev is already the newest version (3.0.2-0ubuntu1.10). libxml2-dev is already the newest version (2.9.13+dfsg-1ubuntu0.3). libxslt1-dev is already the newest version (1.1.34-4ubuntu0.22.04.1). python3-dev is already the newest version (3.10.6-1~22.04). 0 upgraded, 0 newly installed, 0 to remove and 58 not upgraded. User modoboa already exists, skipping creation but please make sure the /srv/modoboa directory exists. Requirement already satisfied: django-braces in ./env/lib/python3.10/site-packages (1.15.0) Requirement already satisfied: Django>=2.2 in ./env/lib/python3.10/site-packages (from django-braces) (4.2.5) Requirement already satisfied: asgiref<4,>=3.6.0 in ./env/lib/python3.10/site-packages (from Django>=2.2->django-braces) (3.7.2) Requirement already satisfied: sqlparse>=0.3.1 in ./env/lib/python3.10/site-packages (from Django>=2.2->django-braces) (0.4.4) Requirement already satisfied: typing-extensions>=4 in ./env/lib/python3.10/site-packages (from asgiref<4,>=3.6.0->Django>=2.2->django-braces) (4.7.1) Collecting rrdtool Using cached rrdtool-0.1.16.tar.gz (22 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting modoboa Obtaining dependency information for modoboa from https://files.pythonhosted.org/packages/0b/46/3c798da8ed7a5546b6b9c202b0896b373f73891b6a1473446136a0bc43dd/modoboa-2.2.0-py3-none-any.whl.metadata Using cached modoboa-2.2.0-py3-none-any.whl.metadata (6.6 kB) Collecting modoboa-amavis Obtaining dependency information for modoboa-amavis from https://files.pythonhosted.org/packages/6b/f1/61ef83253f80ba135314f17d1d2db80fdb3c0b0c5d21c262ad8bf4f29007/modoboa_amavis-1.5.0-py2.py3-none-any.whl.metadata Using cached modoboa_amavis-1.5.0-py2.py3-none-any.whl.metadata (2.5 kB) Collecting modoboa-postfix-autoreply Obtaining dependency information for modoboa-postfix-autoreply from https://files.pythonhosted.org/packages/ba/8e/f629f16e22dd2a2873d154c6f61504946c43c80b4441bfdad1a0009cdebe/modoboa_postfix_autoreply-1.8.0-py2.py3-none-any.whl.metadata Using cached modoboa_postfix_autoreply-1.8.0-py2.py3-none-any.whl.metadata (2.4 kB) Collecting modoboa-sievefilters Obtaining dependency information for modoboa-sievefilters from https://files.pythonhosted.org/packages/a8/17/c870a6966b3c92680749857f4e0aa55641775a2f383a8e0ee44c4b69ddfd/modoboa_sievefilters-1.7.0-py2.py3-none-any.whl.metadata Using cached modoboa_sievefilters-1.7.0-py2.py3-none-any.whl.metadata (2.2 kB) Collecting modoboa-webmail Obtaining dependency information for modoboa-webmail from https://files.pythonhosted.org/packages/d9/0b/1098b89202ac434ed2024c3e4064afce1689a69a4f4c4dedfa198c6d298d/modoboa_webmail-1.8.0-py2.py3-none-any.whl.metadata Using cached modoboa_webmail-1.8.0-py2.py3-none-any.whl.metadata (2.3 kB) Collecting modoboa-contacts Obtaining dependency information for modoboa-contacts from https://files.pythonhosted.org/packages/c2/16/56267bb58e110caa32958e7c1443d881b757f9401c76195e2eb5e9ee8717/modoboa_contacts-1.0.0-py2.py3-none-any.whl.metadata Using cached modoboa_contacts-1.0.0-py2.py3-none-any.whl.metadata (2.8 kB) Collecting modoboa-radicale Obtaining dependency information for modoboa-radicale from https://files.pythonhosted.org/packages/05/05/41f8238295c695a45c4995c77cd3674fa842c668ca82d036a18e59ca03b9/modoboa_radicale-1.7.0-py2.py3-none-any.whl.metadata Using cached modoboa_radicale-1.7.0-py2.py3-none-any.whl.metadata (3.0 kB) Collecting mysqlclient Using cached mysqlclient-2.2.0.tar.gz (89 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'error' error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [22 lines of output] Trying pkg-config --exists mysqlclient Command 'pkg-config --exists mysqlclient' returned non-zero exit status 1. Trying pkg-config --exists mariadb Command 'pkg-config --exists mariadb' returned non-zero exit status 1. Traceback (most recent call last): File "/srv/modoboa/env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/srv/modoboa/env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/srv/modoboa/env/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) File "/tmp/pip-build-env-craylma9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) File "/tmp/pip-build-env-craylma9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-craylma9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup exec(code, locals()) File "", line 154, in File "", line 48, in get_config_posix File "", line 27, in find_package_name Exception: Can not find valid pkg-config name. Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) WARNING: Package(s) not found: modoboa Failed to get version of modoboa. Output is: b'WARNING: Package(s) not found: modoboa\n'

Expected behavior

It should run the installation without the error Failed to get version of modoboa. Output is: b'WARNING: Package(s) not found: modoboa\n'

sirellgithub commented 1 year ago

sudo apt-get install python3-dev default-libmysqlclient-dev build-essential should help. pkg-config fails to find mysqlclient and mariadb libraries, which are needed to build the mysqlclient Python package.

stale[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.