Reputation: 121
I want to install v8 3.15 on MacOs with M2 pro apple chip. Getting the error that is disabled.
I tried to install x86-64 brew with rosetta and use that to install v8 but still getting the same error. Does anyone have a work around for this, or homebrew has completely depricated [email protected] for both intel and apple chips?
Upvotes: 3
Views: 3564
Reputation: 101
This is a problem for many, because at least therubyracer gem still depends on this version of libv8. It would be best to not use this old version by upgrading your application. If you absolutely have to, I found a way to install this using Rosetta 2 and homebrew.
Make sure you're using Rosetta and the x86_64 version of homebrew.
Install python 2:
brew install pyenv
pyenv install 2.7.18
pyenv global 2.7.18
Add pyenv to your path:
PATH=$(pyenv root)/shims:$PATH
Try to install [email protected]
HOMEBREW_NO_INSTALL_FROM_API=1 brew install [email protected]
You will get the following error:
Error: [email protected] has been disabled because it depends on Python 2 to build
Edit the formula to enable installing the old version of v8:
brew edit [email protected]
Remove this line:
disable! date: "2023-06-19", because: "depends on Python 2 to build"
Now you can install the [email protected]:
HOMEBREW_NO_INSTALL_FROM_API=1 arch -x86_64 /usr/local/bin/brew install [email protected]
I believe this will work as long as the old formula is still available from homebrew.
Upvotes: 10