DEV Community

Rigel Carbajal
Rigel Carbajal

Posted on

Érase una vez Brew Doctor y el Warning: ‘config’ scripts exist …

Es algo frustrante cuando quieres tener tu amada terminal de macOS pulcra y libre de errores y al realizar el comando “brew doctor” aparece lo siguiente:

+ ➜ brew doctor

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don’t worry or file an issue; just ignore this. Thanks!

Warning: “config” scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following “config” scripts:

 /Users/rigelgc/.pyenv/shims/python3.10-config
 /Users/rigelgc/.pyenv/shims/python3.9-config
 /Users/rigelgc/.pyenv/shims/python-config
 /Users/rigelgc/.pyenv/shims/python3-config

Enter fullscreen mode Exit fullscreen mode

Puede verse más o menos así, no comprendo del todo a que se debe el error, según entiendo brew doctor es como la vecina comunicativa de la cuadra, en lugar de buscar únicamente en los directorios de entorno:

/usr/local/bin
/usr/sbin
/usr/bin 
/bin 
/sbin
Enter fullscreen mode Exit fullscreen mode

Va y se mete en otros directorios, donde nadie le llama, y crea problemas donde no los hay 😒.

Quedó muy ruda mi explicación, mis vecinos son buena onda, disculpa si alguno se pudo sentir ofendido. Cualquier parecido con la realidad es mera coincidencia 🤣

En fin, para solucionar esto solo basta una línea de código; ahora bien, también dependerá de sí utilizas zsh ó bash, por defecto las nuevas versiones de macOS ya vienen con zsh, pero si utilizas un macOS anterior al 10.15 Catalina posiblemente tengas bash.

Agregaremos un alias a nuestro archivo ~/.zshrc (ò si utilizas bash al archivo ~/.bash_profile) del siguiente modo.

+ ➜ vim ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

y añadimos:

alias brew='PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin brew'
Enter fullscreen mode Exit fullscreen mode

Básicamente lo que hacemos es decirle a nuestra vecina que solo revise en esas carpetas y nada más 🙊

Reiniciamos la terminal y voila!

Esta solución la obtuve de este link, pero literal está en chino jaja

Top comments (0)