DEV Community

Cover image for Arrumando o erro dyld
Daniel Henrique
Daniel Henrique

Posted on

Arrumando o erro dyld

Hoje pela manhã estava trabalhando em um projeto, e precisei confirmar a versão do PHP, e me deparei com o erro:

php -v
dyld[8614]: Library not loaded: /opt/homebrew/opt/libavif/lib/libavif.15.dylib
  Referenced from: <87C1A268-34E4-396F-8BBC-D5591064E333> /opt/homebrew/Cellar/gd/2.3.3_5/lib/libgd.3.dylib
  Reason: tried: '/opt/homebrew/opt/libavif/lib/libavif.15.dylib' ....
Enter fullscreen mode Exit fullscreen mode

Tentei trocar de versão, ou até mesmo dando um php -v ele gerava esse erro e investigando um pouco mais descobri que este erro ocorre devido à falta da biblioteca GD (Graphics Draw). Felizmente, a solução é simples:

Passo 1 - Verifique se consegue ver a versão do PHP

php -v
Enter fullscreen mode Exit fullscreen mode

Nesta etapa, é provável que você encontre um erro semelhante a este:

Error Command

Error Command

Passo 2 - Instalando o a biblioteca GD

Provavelmente o passo anterior deu um erro, semelhante à imagem acima, para resolver esse problema basta instalar a biblioteca GD.

brew install gd
Enter fullscreen mode Exit fullscreen mode

Caso já tenha instalado use esse comando

brew reinstall gd
Enter fullscreen mode Exit fullscreen mode

Passo 3 - Conferindo se deu tudo certo

php -v
Enter fullscreen mode Exit fullscreen mode

Success Command

Prontinho está funcionando

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay