Can't install Homebrew on Silicon iMac

I want to install a MQTT broker on my iMac. Mosquitto is recommended and even claims to support Silicon.

The site instructs how to install Mosquitto using Homebrew, but Homebrew does not support Silicon, except lots of people claim it does and provide instructions-

Install rosetta; install some Xcode tools; either run terminal using rosetta (or not); either use sudo in the Terminal command line (or not).

The only consistency its are the command and the following error


dyld[4669]: Library not loaded: /opt/local/lib/libiconv.2.dylib

  Referenced from: <07DB1F67-4D2D-3A7C-BABF-53DEF25C30D3> /opt/local/lib/libidn2.0.dylib

  Reason: tried: '/opt/local/lib/libiconv.2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/local/lib/libiconv.2.dylib' (no such file), '/opt/local/lib/libiconv.2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))Library not loaded: /opt/local/lib/libiconv.2.dylib

  Referenced from: <3441097C-64CF-3784-89CF-88990F76379C> /opt/local/lib/libpsl.5.dylib

  Reason: tried: '/opt/local/lib/libiconv.2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/local/lib/libiconv.2.dylib' (no such file), '/opt/local/lib/libiconv.2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))


Has anybody actually installed Homebrew (or better- Mosquitto) onto an M3 Mac running Sonoma? If so, please could you share the secret method with me.

Thanks

Frank 2024 iMac, M3 Silicon, 16GB RAM, OS 14.7.6

iMac 24″, macOS 14.7

Posted on Jun 11, 2025 3:10 PM

Reply
8 replies

Jun 12, 2025 9:17 AM in response to Franknfurterx

Did you also install HomeBrew? If so, then MacPorts & HomeBrew may be at odds here. Homebrew is known to mess with the PATH variable causing problems, plus if the PATH is configured to have Homebrew's versions of various utilities have priority, then MacPorts may be trying to use those versions instead of native macOS versions.


I've never used MacPorts and only ever used Homebrew a few times on a test machine. I know with Homebrew, the developers clearly state some formulas may not be available for an M-series Mac. I would imagine the same is likely true for MacPorts as well.


FYI, be very careful when using the command line since there are not safety nets. And I hope you have good backups since you can very easily corrupt the system by using MacPorts, Homebrew, and the command line.


Jun 12, 2025 3:39 PM in response to Franknfurterx

I've used Fink, MacPorts, and Homebrew (in that order). They all tend to store their stuff in different locations.


Homebrew changed the location for Apple Silicon, so even the intel and Apple Silicon stuff are in different locations.


I have one system with both MacPorts and Homebrew concurrently installed, without any interference.


Setting up Homebrew path should be done using:


M-series Apple Silicon based Mac

     eval $(/opt/homebrew/bin/brew shellenv)


intel based Mac

     eval $(/usr/local/bin/brew shellenv)


This command should be stored in your shell initialization file. Zsh would be $HOME/.zshenv


If you are still using bash, then in $HOME/.bash_profile


Manually changing your PATH is not advised. Let the above commands do this for you.

Jun 11, 2025 3:28 PM in response to Franknfurterx

OK, after spending an evening fighting Terminal to install Homebrew I changed the command in the instructions to sudo port instal mosquitto

And it worked...sort of;

tThis error was reported, but terminal seems to have carried on regardless-

Error: Failed to configure cmake: configure failure: command execution failed

Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/main.log for details.

Error: Problem while installing cmake

Error: rev-upgrade failed: Error rebuilding tiff

Error: Follow https://guide.macports.org/#project.tickets if you believe there

is a bug.

--->  Some of the ports you installed have notes:

  mosquitto has the following notes:

    A startup item has been generated that will aid in starting mosquitto with

    launchd. It is disabled by default. Execute the following command to start

    it, and to cause it to launch at startup:

        sudo port load mosquitto

  python310 has the following notes:

    To make this the default Python or Python 3 (i.e., the version run by the

    'python' or 'python3' commands), run one or both of:

        sudo port select --set python python310

        sudo port select --set python3 python310

Does this mean it's OK? or have I got half the application and terminal doesn't care?

Thanks

Frank

Jun 12, 2025 2:14 AM in response to Franknfurterx

Unsurprisingly mosquitto is not installed. Not helpful that Macports told me how to configure it on startup after failing to actually install it. An updated version of mac ports has also failed to install, but the benefit of the update is that Macports has stopped lying to me.


Last login: Thu Jun 12 09:48:18 on console

me@iMac ~ % sudo port install mosquitto

Password:

--->  Computing dependencies for mosquitto

--->  Cleaning mosquitto

--->  Updating database of binaries

--->  Scanning binaries for linking errors

--->  Found 432 broken files, matching files to ports

--->  Found 8 broken ports, determining rebuild order

You can always run 'port rev-upgrade' again to fix errors.

The following ports will be rebuilt:

 libvorbis @1.3.7

 libtheora @1.1.1

 pcre @8.45

 graphviz @7.0.1+pangocairo+x11

 vala @0.56.3

 rav1e @0.5.1

 librsvg @2.54.5

 ffmpeg @4.4.2+gpl2

Continue? [Y/n]: Y

--->  Fetching archive for libvorbis

--->  Attempting to fetch libvorbis-1.3.7_0.darwin_23.arm64.tbz2 from https://packages.macports.org/libvorbis

--->  Attempting to fetch libvorbis-1.3.7_0.darwin_23.arm64.tbz2.rmd160 from https://packages.macports.org/libvorbis

--->  Unable to uninstall libvorbis @1.3.7_0, the following ports depend on it:

--->  libtheora @1.1.1_3

--->  ffmpeg @4.4.2_3+gpl2

Warning: Uninstall forced.  Proceeding despite dependencies.

--->  Deactivating libvorbis @1.3.7_0

--->  Cleaning libvorbis

--->  Uninstalling libvorbis @1.3.7_0

--->  Cleaning libvorbis

--->  Computing dependencies for libvorbis

--->  Installing libvorbis @1.3.7_0

--->  Activating libvorbis @1.3.7_0

--->  Cleaning libvorbis

--->  Fetching archive for libtheora

--->  Attempting to fetch libtheora-1.1.1_3.darwin_23.arm64.tbz2 from https://packages.macports.org/libtheora

--->  Attempting to fetch libtheora-1.1.1_3.darwin_23.arm64.tbz2.rmd160 from https://packages.macports.org/libtheora

--->  Unable to uninstall libtheora @1.1.1_3, the following ports depend on it:

--->  ffmpeg @4.4.2_3+gpl2

Warning: Uninstall forced.  Proceeding despite dependencies.

--->  Deactivating libtheora @1.1.1_3

--->  Cleaning libtheora

--->  Uninstalling libtheora @1.1.1_3

--->  Cleaning libtheora

--->  Computing dependencies for libtheora

--->  Installing libtheora @1.1.1_3

--->  Activating libtheora @1.1.1_3

--->  Cleaning libtheora

--->  Fetching archive for pcre

--->  Attempting to fetch pcre-8.45_0.darwin_23.arm64.tbz2 from https://packages.macports.org/pcre

--->  Attempting to fetch pcre-8.45_0.darwin_23.arm64.tbz2.rmd160 from https://packages.macports.org/pcre

--->  Unable to uninstall pcre @8.45_0, the following ports depend on it:

--->  glib2 @2.70.5_0+x11

Warning: Uninstall forced.  Proceeding despite dependencies.

--->  Deactivating pcre @8.45_0

--->  Cleaning pcre

--->  Uninstalling pcre @8.45_0

--->  Cleaning pcre

--->  Computing dependencies for pcre

--->  Installing pcre @8.45_0

--->  Activating pcre @8.45_0

--->  Cleaning pcre

--->  Computing dependencies for graphviz

--->  Fetching archive for graphviz

--->  Attempting to fetch graphviz-12.2.1_0+pangocairo+x11.darwin_23.arm64.tbz2 from https://packages.macports.org/graphviz

--->  Attempting to fetch graphviz-12.2.1_0+pangocairo+x11.darwin_23.arm64.tbz2 from https://mse.uk.packages.macports.org/graphviz

--->  Attempting to fetch graphviz-12.2.1_0+pangocairo+x11.darwin_23.arm64.tbz2 from https://fra.de.packages.macports.org/graphviz

--->  Configuring graphviz

Error: Failed to configure graphviz: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphviz/graphviz/work/graphviz-12.2.1/config.log

Error: Failed to configure graphviz: configure failure: command execution failed

Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphviz/graphviz/main.log for details.

Error: rev-upgrade failed: Error rebuilding graphviz

Error: Follow https://guide.macports.org/#project.tickets if you believe there

is a bug.

me@iMac ~ % 

Any suggestions?

Ta

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can't install Homebrew on Silicon iMac

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.