Failure to Install Alcali on Ubuntu 22.04.0 with Docker Compose due to mysqlclient Installation Error
guiguir68 opened this issue · 3 comments
Describe the bug
I am attempting to install Alcali on a brand new Ubuntu 22.04.0 server.
After cloning the git repo, I run the docker-compose command to build the images and launch the various applications.
The build fails at Step 8/17: RUN salt-pip install mysqlclient
Here is the error:
Step 8/17 : RUN salt-pip install mysqlclient
---> Running in 0ede12563e05
Collecting mysqlclient
Downloading mysqlclient-2.2.4.tar.gz (90 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.4/90.4 kB 4.1 MB/s eta 0:00:00
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
╰─> [20 lines of output]
Error in sitecustomize; set PYTHONVERBOSE for traceback:
TypeError: expected str, bytes or os.PathLike object, not NoneType
Fatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site.py", line 617, in <module>
main()
File "/opt/saltstack/salt/lib/python3.10/site.py", line 610, in main
execsitecustomize()
File "/opt/saltstack/salt/lib/python3.10/site-packages/relenv/runtime.py", line 932, in wrapper
import sitecustomize
File "/tmp/pip-build-env-z2q0p0e0/site/sitecustomize.py", line 23, in <module>
site.addsitedir(path)
File "/opt/saltstack/salt/lib/python3.10/site.py", line 216, in addsitedir
sitedir, sitedircase = makepath(sitedir)
File "/opt/saltstack/salt/lib/python3.10/site.py", line 97, in makepath
dir = os.path.join(*paths)
File "/opt/saltstack/salt/lib/python3.10/posixpath.py", line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
[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.
[notice] A new release of pip is available: 23.3.2 -> 24.0
[notice] To update, run: /opt/saltstack/salt/bin/python3.10 -m pip install --upgrade pip
The command '/bin/sh -c salt-pip install mysqlclient' returned a non-zero code: 1
ERROR: Service 'master' failed to build : Build failed
To Reproduce
Steps to reproduce the behavior:
- git clone https://github.com/latenighttales/alcali.git
- cd alcali
- docker-compose up --scale minion=2
- See error
Server:
- OS: Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-94-generic x86_64)
- Docker version 24.0.5, build 24.0.5-0ubuntu1~22.04.1
- docker-compose version 1.29.2
Have the same issue. workaround
edit the /docker/Dockerfile-master
and comment out
RUN salt-pip install mysqlclient
add this
RUN /opt/saltstack/salt/bin/python3.10 -m pip install mysqlclient
this is already an issue in here also saltstack/salt#65980
Have the same issue. workaround
edit the /docker/Dockerfile-master
and comment out
RUN salt-pip install mysqlclient
add this
RUN /opt/saltstack/salt/bin/python3.10 -m pip install mysqlclient
this is already an issue in here also saltstack/salt#65980
Thank's AAm-kun. I sent a PR with your workaround.