OSError: 未找到名为”cairo-2″的库 – 我正在使用 Mac M1 芯片

huangapple go评论111阅读模式
英文:

OSError: no library called "cairo-2" was found - I am using mac m1 chip

问题

尝试使用brew安装: brew install cairo

然后将以下行添加到我的.bashrc.zshrc文件:

export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib:$DYLD_FALLBACK_LIBRARY_PATH

但仍然出现相同的错误。

我甚至尝试了这些:

  1. brew install cairo pango gdk-pixbuf libxml2 libxslt libffi

  2. pip install pipwin pipwin install cairocffi

我尝试在Mac M1上运行一个具有一些依赖项的Flask项目,但出现了这个错误。

英文:

I tried to install it using brew: brew install cairo.

Then added the following line to my .bashrc and .zshrc file:

export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib:$DYLD_FALLBACK_LIBRARY_PATH

But it is still giving me the same error.

I even tried those:

  1. brew install cairo pango gdk-pixbuf libxml2 libxslt libffi

  2. pip install pipwin
    pipwin install cairocffi

I tried to run a flask project which had some dependencies in a mac m1 and it is giving me this error

答案1

得分: 1

你需要前往你的 macOS 中的“应用程序” -> “实用工具”,然后找到“终端”应用,右键点击它,选择“获取信息”,然后勾选“使用 Rosetta 打开”。

接着,打开终端并输入以下命令:

brew install cairo
brew install pango

要执行这些命令,你需要先安装 Homebrew,你可以查看 brew 文档 获取更多信息。

英文:

You have to go to your Applications -> Utilities in your mac and there will be Terminal right click it click Get Info then check Open using Rosetta.

Then open a terminal and write:

brew install cairo
brew install pango

To do this you should have installed Homebrew you can check the brew docs.

huangapple
  • 本文由 发表于 2023年3月7日 21:05:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/75662355.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定