Yesterday I updated my Macbook Air (early 2015) to macOS Mojave.
Since then when I open a terminal window I am getting recurring messages. I can't run any terminal command at the moment.
What can cause this message?
Best Answer
Your system is running something called the Malloc Debugging and reporting a problem in your memory ? It is a program to detect memory bugs. Since it is stuck in a endless loop, the reported memory bug might not even exist.
It reports the same bug in your memory, over and over as seen here.
Your default shell is the brew-installed zsh. You probably removed the folder containing zsh and some other important files/folders/libraries.
In the preferences of Terminal (or System Preferences > Users & Groups > ctrl-click user_name > Advanced Options... > login shell | as far as I remember you have to reboot to make this work) set the default shell back to /bin/bash. Then relaunch Terminal and uninstall brew and reinstall it afterwards. You may have to uninstall brew manually by deleting some folders in /usr/local/ if you deleted too many files and folders previously ("I accidentally deleted some files from my Applications directory. I don't recall exactly what but some of them included the Cellar directory.").
In a second step reinstall brew and brew installed execs.
As per this discussion on Apple support community, you should be able to overcome the issue by deleting InstallInfo.plist file from within the macOS Mojave installer app.
Go to your applications folder.
Find the installer for macOS Mojave.
Right click on the installer and click "Show Package Contents".
Best Answer
Your system is running something called the Malloc Debugging and reporting a problem in your memory ? It is a program to detect memory bugs. Since it is stuck in a endless loop, the reported memory bug might not even exist.
It reports the same bug in your memory, over and over as seen here.
More info about Debugging memory-related bugs
https://developer.apple.com/library/archive/documentation/Performance/Conceptual/ManagingMemory/Articles/MallocDebug.html
To stop the program in Terminal try Use key combination in Terminal Ctrl + C. or, Ctrl + Z , or CTRL+ \
You can also try...
Simple test is to start in Safe mode, or even more simple is to create new user account and try it.