homebrewmacos-venturafontconfig

OSError about 'fontconfig-1' after install 'fontconfig' on mac OS ventura on rosetta


I'm trying to run django migrate with iTerm that is running on rosetta, my OS is mac OS 13.0.1 Ventura.

When I've run python manage.py migrate command, I got OSError: ctypes.util.find_library() did not manage to locate a library called 'fontconfig-1' error on both iTerm terminals (arch arm64 and i386). I checked arm64 and i386 results when i typed arch command on each terminals.

I already installed fontconfig package with /opt/homebrew/bin/brew and /usr/local/Homebrew/bin/brew both terminals. But I don't know why I got this error.

I also can't install fontconfig-1 that is appeared in error message. Are fontconfig and fontconfig-1 different packages?

I may have made a basic simple mistake because it's first time using the m1 but I can't solve my problem.

from ctypes.util import find_library
print(find_library('fontconfig-1')) # None
print(find_library('fontconfig')) # /usr/local/lib/libfontconfig.dylib

Solution

  • It was WeasyPrint problem. I didn't install libffi package on i386 terminal. My alias link of brew on i386 terminal was /opt/homebrew/bin/brew so I changed it to /usr/local/bin/brew.

    and I reinstall libffi package and I solved it.