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

Failure to Install Alcali on Ubuntu 22.04.0 with Docker Compose due to mysqlclient Installation Error #529

Open
guiguir68 opened this issue Feb 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@guiguir68
Copy link

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:

  1. git clone https://github.com/latenighttales/alcali.git
  2. cd alcali
  3. docker-compose up --scale minion=2
  4. 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
@guiguir68 guiguir68 added the bug Something isn't working label Feb 21, 2024
@AAm-kun
Copy link

AAm-kun commented Feb 24, 2024

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

@guiguir68
Copy link
Author

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.

@robinpecha
Copy link

Tthanks for your workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants