The error "cannot find redis from homebrew" typically occurs when you have installed Redis using Homebrew, but the system cannot locate the Redis executable. This could be due to a couple of reasons: either Redis was not properly installed, or the system path does not include the directory containing the Redis executable. Another possible reason is that homebrew might be having issues with its symbolic links or there's a conflict with another Redis installation that was not managed by Homebrew.
To resolve this issue, first verify if Redis has been successfully installed on your system by running
brew info redis. If the installation was successful, the command will display information about Redis, including its installed location. Make sure that the directory containing the Redis executable is added to your system's PATH variable. You can do this by adding
export PATH="/usr/local/sbin:$PATH" to your shell profile (e.g.,
.bash_profile) and restarting your terminal session.
If Redis still cannot be found, try reinstalling it using Homebrew with the following commands:
brew uninstall redis
brew install redis
If there's a conflict with another Redis installation, remove the conflicting version, and ensure only the Homebrew-managed Redis installation remains. If the problem persists, check Homebrew's documentation and support resources for any known issues or additional guidance.