tmux-plugins / tpm

Tmux Plugin Manager
MIT License
12.07k stars 421 forks source link

'~/.local/share/tmux/plugins/tpm/tpm' returned 1 on macOS Sonoma 14.3.1 #276

Closed nexxai closed 7 months ago

nexxai commented 7 months ago

Ok so I have a very weird issue that I'm hoping someone can shed some light on.

If I open Alacritty and there is not an existing tmux server running, I get the absolute base level tmux config. Then, if I try and run tmux source ~/.config/tmux/tmux.conf, I get the error '~/.local/share/tmux/plugins/tpm/tpm' returned 1.

If I browse to the folder ~/.local/share/tmux/plugins/tpm and run ./tpm it loads up correctly.

Can anyone see anything I'm doing wrong? I've made sure the tpm and tmux-sensible plugins get installed, but this thing just does not want to load normally for me.

OS: macOS Sonoma 14.3.1 Processor: Apple M1 tmux: v3.4

alacritty.toml

[env]
TERM = "xterm-256color"

[shell]
program = "/opt/homebrew/bin/tmux"
args = ["new", "-A", "-s nexxai"]

~/.config/tmux/tmux.conf

bind-key & kill-window
set -g default-terminal "xterm-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
set-environment -g TMUX_PLUGIN_MANAGER_PATH "~/.local/share/tmux/plugins/"

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.local/share/tmux/plugins/tpm/tpm'
blueneogeo commented 7 months ago

Having the same issue after upgrading yesterday.

grepinsight commented 7 months ago

I have the same issue as well

nexxai commented 7 months ago

Ok, I have since done two things which seem to have solved my problem:

  1. Installed TPM using homebrew
  2. Added this to my tmux.conf: set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin"

To be clear, that does not set your shell's PATH to that location, it's only used by tmux itself.

After I did those two things, killed the server, and restarted tmux, everything works great.