homebrewrosetta-2

How to install all dependencies separately again for a given package in Homebrew?


I am currently on an M1 mac, and I want to install a package that needs to be emulated using rosetta 2. Therefore I know that I can either install a second parallel homebrew installation (which is something that I would prefer to avoid) or I can use the arch --x86_64 flag to specify the architecture for the package. But as the author of this post pointed out that can cause problems because some of the dependencies can already exist for ARM and that will result in a conflict. So Im looking for a way to tell Homebrew to install in conflicts. So is there a way to tell Homebrew to install those dependencies again/speratetly? So that those conflicts do not occur?


Solution

  • The only official way is to install Apple Silicon in /opt/homebrew and Intel with Rosetta in /usr/local. This is one of the FAQ answers.

    To install them together without conflicts you would need to manually install the Intel version and put in the work to manually move each file into /opt/homebrew.

    Short of there being a bottle of something available in the Intel homebrew, there isn't much benefit from doing it manually this way.

    The post you linked to appears to be referring to installing a bottle in the Apple Silicon installation (/opt/homebrew) by running it as Intel. That is not the ideal way to handle this and will lead to conflicts.

    Your linked post had a link to this article. It demonstrates the right way, namely installed a new isolated homebrew install in /usr/local. Then to install new Intel bottles, you run the Intel version in /usr/local/bin/brew to do the install. You should see no conflicts.