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

OSError: no library called "cairo-2" was found #544

Closed
schroedk opened this issue Mar 25, 2024 · 2 comments · Fixed by #546
Closed

OSError: no library called "cairo-2" was found #544

schroedk opened this issue Mar 25, 2024 · 2 comments · Fixed by #546
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@schroedk
Copy link
Collaborator

When trying to build the documentation via

mkdocs build

or

mkdocs serve

I observed the error

OSError: no library called "cairo-2" was found no library called "cairo" was found no library called "libcairo-2" was found

Setup:

  • Python 3.8.19
  • Mac OS 14.4 / M2 Max

The error is due to the corresponding lib files not linked to locations, where mkdocs is looking for it, when cairo is installed via
brew.

Also observed here:

The described workaround is setting the fallback environment variable:

export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/opt/homebrew/lib

I suggest to mention this in our CONTRIBUTING.md.

@schroedk schroedk added bug Something isn't working documentation Improvements or additions to documentation labels Mar 25, 2024
@schroedk
Copy link
Collaborator Author

@mdbenito @AnesBenmerzoug did you have to install the non-python dependencies manually? So something like:

apt-get install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev

@AnesBenmerzoug
Copy link
Collaborator

I am not 100% sure, but I would say yes.

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

Successfully merging a pull request may close this issue.

2 participants