Building on MAC

1,145 views
Skip to first unread message

Steph van Schalkwyk

unread,
Mar 24, 2023, 3:54:01 PM3/24/23
to tmux-users
Hi
Could someone please point me to the docs for building this on MAC? I'm a Linux person but recently started at a MAC company.
Thanks

Nazri Ramliy

unread,
Mar 24, 2023, 10:07:52 PM3/24/23
to Steph van Schalkwyk, tmux-users
On Sat, 25 Mar 2023 at 3:54 AM, Steph van Schalkwyk <st...@remcam.net> wrote:
Hi
Could someone please point me to the docs for building this on MAC? I'm a Linux person but recently started at a MAC company.

Have a look at this script 

I use it to compile tmux on both linux and tmux. 

nazri

Nazri Ramliy

unread,
Mar 24, 2023, 10:23:05 PM3/24/23
to Steph van Schalkwyk, tmux-users
s/tmux\./mac./


;)

Steph van Schalkwyk

unread,
Mar 24, 2023, 10:53:37 PM3/24/23
to Nazri Ramliy, tmux-users
Thank you both! 
It now installs normally. @Trey, it was a permissions issue. Also, homebrew config was out of whack. 
Thanks again
Steph

"In case it may help people facing this issue in the future, I'll share the exact steps that I followed to resolve the issue.

The following CLI commands are intended to be run on an Apple silicon-equipped Mac in the built-in Terminal application running the macOS-default shell, Zsh:

  1. Run a Homebrew command to confirm that an error like the following appears:

    $ brew install <formula>
    
    Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!
    Please create a new installation in /opt/homebrew using one of the
    "Alternative Installs" from:
      https://docs.brew.sh/Installation
    

    Or:

    $ brew doctor
    
    Warning: Your Homebrew's prefix is not /opt/homebrew.
    Some of Homebrew's bottles (binary packages) can only be used with the default
    prefix (/opt/homebrew).
    You will encounter build failures with some formulae.
    

    If either of these errors appears, it is likely that the steps below are applicable to your case.

  2. Navigate to the /opt folder:

    $ cd /opt
    
  3. Create a folder named homebrew. By default superuser privileges are required to write inside of the /opt folder, which means that it is necessary to use sudo:

    $ sudo mkdir homebrew
    
  4. Grant write access to the homebrew folder so that your user can perform the Homebrew installation:

    $ sudo chmod go+w homebrew
    
  5. Perform the four steps listed on the "Alternative Installs" page (the page mentioned in the first error message in step 1):

    1. Install Homebrew:

      $ curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
      
    2. Set Homebrew's prefix in your current Terminal session:

      $ eval "$(homebrew/bin/brew shellenv)"
      
    3. Update Homebrew:

      $ brew update --force --quiet
      
    4. Revoke write access to specific folders and files:

      $ chmod -R go-w "$(brew --prefix)/share/zsh"
      
  6. Set Homebrew's prefix in future Terminal sessions by adding the necessary command to one of Zsh's startup files. As far as I can tell, .zshrc is the preferred startup file for this type of command:

    $ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
    

    Note that if there are any other existing Terminal sessions on your machine that have been open since before running the above command, the correct Homebrew prefix will still be unset in those sessions.

  7. Confirm that Homebrew's prefix is now properly set:

    $ type -a brew
    
    brew is /opt/homebrew/bin/brew
    brew is /usr/local/bin/brew
    

    Or:

    $ brew doctor
    
    Your system is ready to brew.
    

It should now be possible to continue using Homebrew normally."


Steph van Schalkwyk
Principal, remcam llc, dba. Remcam Search Engines
Elastic Partner
Skype: svanschalkwyk



Trey Blancher

unread,
Mar 28, 2023, 1:23:43 PM3/28/23
to Steph van Schalkwyk, tmux-users
Steph,

You should look into macOS Homebrew: https://brew.sh, it'd be easiest to
install tmux from that.

Trey Blancher
tr...@blancher.net
> --
> You received this message because you are subscribed to the Google Groups
> "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [1]tmux-users+...@googlegroups.com.
> To view this discussion on the web, visit
> [2]https://groups.google.com/d/msgid/tmux-users/273138c2-3adc-4763-a322-5ad4b8639d0bn%40googlegroups.com.
>
>References
>
> Visible links
> 1. mailto:tmux-users+...@googlegroups.com
> 2. https://groups.google.com/d/msgid/tmux-users/273138c2-3adc-4763-a322-5ad4b8639d0bn%40googlegroups.com?utm_medium=email&utm_source=footer

Reply all
Reply to author
Forward
0 new messages