【问题标题】:How to change prefix of HomeBrew?How to change prefix of HomeBrew?
【发布时间】:2022-12-27 04:21:10
【问题描述】:

Hello everyone, i have change my Mac from Mac Silicon to my new Intel chip Mac. I have backup to my new intel Mac and Homebrew have this error

Warning: Your Homebrew's prefix is not /usr/local.

Many of Homebrew's bottles (binary packages) can only be used with the default prefix. Consider uninstalling Homebrew and reinstalling into the default prefix. It is expected behaviour that some formulae will fail to build in this unsupported configuration. It is expected behaviour that Homebrew will be buggy and slow. Do not create any issues about this on Homebrew's GitHub repositories. Do not create any issues even if you think this message is unrelated. Any opened issues will be immediately closed without response. Do not ask for help from MacHomebrew on Twitter. You may ask for help in Homebrew's discussions but are unlikely to receive a response. Try to figure out the problem yourself and submit a fix as a pull request. We will review it but may or may not accept it.

And when i install dart with command "brew install dart" it show this error: Error: Cannot install on Intel processor in ARM default prefix (/opt/homebrew)!

How can i change my prefix from /opt/homebrew to usr/local... Thank you very much

I have try to uninstall and reinstall, and it don't work

【问题讨论】:

标签: installation homebrew intel apple-m1 prefix


【解决方案1】:

To fix the Homebrew's prefix issue, following steps worked for me with Linux x86_64. Before proceeding, brew doctor would return Your Homebrew's prefix is not ..

  1. Uninstall Homebrew:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

  2. Delete any folders containing brew installation in home/linuxbrew/ directory.

  3. Use brew install script from here and update the HOMEBREW_PREFIX to the desired location. Detailed steps can be referred here

  4. Update .zshrc file to include export PATH=/{HOMEBREW_PREFIX}/bin:$PATH where HOMEBREW_PREFIX is the value of the path used in step 3.

  5. source .zshrc

    After step 5, brew doctor should return Your system is ready to brew.

【讨论】:

    猜你喜欢
    • 2022-12-27
    • 2022-12-02
    • 2022-12-27
    • 2022-12-01
    • 2022-12-28
    • 2022-12-16
    • 2022-11-20
    • 2022-12-01
    • 2022-12-01
    相关资源
    最近更新 更多