First, let’s talk about the problems I encountered. Brew install & lt; formula> Error reporting:
(venv_mac) haypin@HaypinsMBP /usr/local/Cellar brew install cmake
Error: [email protected]: wrong number of arguments (given 1, expected 0)
Even if I quit the previous virtual environment, I opened the debugging information and found:
(venv_mac) ✘ haypin@HaypinsMBP /usr/local/Cellar brew install --debug cmake
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/sphinx-doc.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/[email protected]
Error: [email protected]: wrong number of arguments (given 1, expected 0)
Executable/usr/local/homebrew/library/homebrew/brew.rb (formulary:: formulaloader): always loading/usr/local/homebrew/library/taps/homebrew/homebrew core/formula/ [email protected] , which reports an error Python 3.9 parameter transfer error.
It is said on the Internet that brew install cmake can solve the problem, but I still report this error on the premise that cmake has been installed. There is no way but to reinstall homebrew and hope for a new homebrew core/ [email protected] It can be executed normally
(venv_mac) ✘ haypin@HaypinsMBP /usr/local/Cellar /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Warning: The Ruby Homebrew uninstaller is now deprecated and has been rewritten in
Bash. Please migrate to the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
^C
It is found that the script for uninstalling homebrew has expired. It is recommended to use:
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh )”
Then use this:
(venv_mac) ✘ haypin@HaypinsMBP /usr/local/Cellar /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
Warning: This script will remove:
/Users/haypin/Library/Caches/Homebrew/
/Users/haypin/Library/Logs/Homebrew/
/usr/local/Caskroom/
/usr/local/Cellar/
/usr/local/bin/brew -> /usr/local/bin/brew
Are you sure you want to uninstall Homebrew?This will remove your installed packages! [y/N] y
==> Removing Homebrew installation...
Warning: Failed to delete /usr/local/Caskroom
rm: /usr/local/Caskroom: Permission denied
Warning: Failed to delete /usr/local/Cellar
rm: /usr/local/Cellar: Permission denied
==> Removing empty directories...
==> /usr/bin/sudo /usr/bin/find /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/var /usr/local/Caskroom /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks -name .DS_Store -delete
==> /usr/bin/sudo /usr/bin/find /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/var /usr/local/Caskroom /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks -depth -type d -empty -exec rmdir {} ;
==> Homebrew uninstalled!
The following possible Homebrew files were not deleted:
/usr/local/.com.apple.installer.keep
/usr/local/Frameworks/
/usr/local/Homebrew/
/usr/local/bin/
/usr/local/etc/
/usr/local/go/
/usr/local/include/
/usr/local/lib/
/usr/local/mysql -> /usr/local/mysql
/usr/local/mysql-8.0.21-macos10.15-x86_64/
/usr/local/opt/
/usr/local/sbin/
/usr/local/share/
/usr/local/var/
You may wish to remove them yourself.
I didn’t use sudo, so/usr/local/cashroom and/usr/local/cell were not deleted. I forgot that CWD was in/usr/local/cell. Finally, I prompted that a possible homebrw file had not been deleted, so I deleted it manually:
(venv_mac) ✘ haypin@HaypinsMBP /usr/local sudo rm -r Homebrew
Then reinstall homebrew according to the latest installation script on the official website:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
This is the installation script of the official website. It uses foreign sources. The download speed is very slow and may fail. Just execute it a few more times. The domestic sources are very unfriendly when upgrading brew later. The error I reported in Python 3.9 this time is homebrew 2.4.9. Even if brew update is still 2.4.9, it will not be upgraded to the latest 3.2.0, so although slow down, I still want to use foreign sources.
Zshrc reports an error after changing the Tsinghua source:
(venv_mac) haypin@HaypinsMBP ~/cmake_tutorial source ~/.zshrc
compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask
Then I found that the cmake official website has a DMG installation package that can be installed to/applications, so I downloaded and installed it from the cmake official website. If there is a need to upgrade later, I will directly the whole RM – R / Applications/cmake.app and then download the latest cmake-3.21.0-macos-universal.dmg installation. Of course, add the path/applications/cmake.app/contents/bin/ to the path.
I was frightened by the mistake reported by the brew install cmake. In the future, the software that I can download from the official website will go to the official website.
Read More:
- [Solved] urllib.error.URLError: <urlopen error [SSL: WRONG_VERSION_NUMBER] wrong version number
- PIP Install Caused by SSLError(SSLError(1, ‘[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123)’))
- Tensor for argument #2 ‘mat1‘ is on CPU, but expected it to be on GPU (while checking arguments for
- Python ValueError: only 2 non-keyword arguments accepted
- Python TypeError: not all arguments converted during string formatting [Solved]
- [Solved] Python Error: IndentationError: expected an indented block
- Python PIP TypeError: expected str, bytes or os.PathLike object, not int
- Typeerror in Python regular expression: expected string or bytes like object
- Python Kmeans Error: ConvergenceWarning: Number of distinct clusters (99) found smaller than n_clusters (100).
- Python Error: _csv.Error sequence expected
- Python RuntimeError: Expected 4-dimensional input for 4-dimensional weight [32, 1, 5, 5]
- [Solved] Error: unrecognized arguments: — no site packages
- How to Solve Python WARNING: Ignoring invalid distribution -ip (e:\python\python_dowmload\lib\site-packages)
- Invalid python sd, Fatal Python error: init_fs_encoding: failed to get the Python cod [How to Solve]
- [Solved] Matplotlib ERROR: MatplotlibDeprecationWarning: Adding an axes using the same arguments…
- [Solved] error: unrecognized arguments: –multiprocessing-fork
- [Solved] opencv-python: recipe for target ‘modules/python3/CMakeFiles/opencv_python3.dir/all‘ failed
- [Solved] NPM install Error: check python checking for Python executable python2 in the PATH
- [Solved] main.py: error: the following arguments are required: