tpm: I get error 127 when trying to install.
Pressing prefix + I gives me this message:
'~/.tmux/plugins/tpm/tpm' returned 127
TMUX environment reloaded.
Done, press ENTER to continue.
I have the prerequisites installed
username > ~ > uname -s
CYGWIN_NT-6.1
username > ~ > which bash
/usr/bin/bash
username > ~ > which dirname
/usr/bin/dirname
This is my tmux.conf
# ctrl-a as prefix instead of ctrl-b
unbind C-b
set -g prefix C-a
# 'C-a C-a' sends C-a keypress to the current window
bind C-a send-prefix
# mouse version >= 2.1
set -g mouse on
# mouse tmux <= 2.0
#set -g mode-mouse on
#set -g mouse-resize-pane on
#set -g mouse-select-pane on
#set -g mouse-select-window on
# vi mode
set-window-option -g mode-keys vi
# vim features
unbind [
bind Escape copy-mode
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
bind C-p run "tmux set-buffer \"$(getclip)\"; tmux paste-buffer"
# restore clear screen
bind C-l send-keys 'C-l'
# restore kill line
bind C-k send-keys 'C-k'
# source this file after changes
bind R source-file ~/.tmux.conf
# source this file after changes
bind s set-window-option synchronize-panes
# Smart pane switching with awareness of vim splits
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
#### COLOUR (Solarized dark)
# default statusbar colors
set -g status-bg black #base02
set -g status-fg yellow #yellow
set -g status-attr default
# default window title colors
set -g window-status-fg brightblue #base0
set -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
set -g window-status-current-fg brightred #orange
set -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
set -g pane-border-fg black #base02
set -g pane-active-border-fg brightgreen #base01
# message text
set -g message-bg black #base02
set -g message-fg brightred #orange
# pane number display
set -g display-panes-active-colour blue #blue
set -g display-panes-colour brightred #orange
# clock
set -g clock-mode-colour green #green
# statusline
source-file ~/.tmuxline.conf
# TPM
# list of plugins
set -g @shell_mode 'vi'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm'"
run '~/.tmux/plugins/tpm/tpm'
About this issue
- Original URL
- State: open
- Created 11 years ago
- Reactions: 3
- Comments: 51 (4 by maintainers)
Commits related to this issue
- solution to the problem 'tpm returned 127' See issue #67 for more discussion — committed to shouya/tpm by shouya 9 years ago
- Fix Tmux's tpm I can finally use tmux-fingers again! I was getting `'~/.tmux/plugins/tpm/tpm' returned 127` when source the tmux.conf but it was just because I'm stupid. https://github.com/tmux-plug... — committed to sauloperez/dotfiles by sauloperez 7 years ago
- Fix tmux configs! Fixes from: - https://github.com/tmux/tmux/issues/754 - https://github.com/tmux/tmux/issues/1689 - https://github.com/tmux/tmux/issues/230 - https://github.com/tmux-plugins/tpm/issu... — committed to nickmoorman/dotfiles by nickmoorman 5 years ago
- solution to the problem 'tpm returned 127' See issue #67 for more discussion — committed to karbobc/tpm by shouya 9 years ago
- [fix] tpm needs to know the homebrew path Related to https://github.com/tmux-plugins/tpm/issues/67 — committed to milanmlft/dotfiles by milanmlft 3 years ago
I too have got a 127 error, but that is solely due to my mistake: I did not fetch the
tpmat all. The following line fixed my127error:A better way to get around with this is to insert the following line:
before the first
run-shell/runcommand in your~/.tmux.conffile, and leave everything else untouched.If you are using Homebrew >3.0.0, you’ll need to add this to your
PATHintmux.conf:Notice
/opt/homebrew/bin.For everyone get 127 error, make
tmuxcommand available for all users may be fix this problem.I’m using a mac, and install tmux use homebrew, it will be installed at
/usr/local/bin/tmux, after I make a symbol link to/usr/bin/tmux, everything will be working.In newer versions of macOS you can’t write to
/usr/bin, not even with sudo. So you can’t run:For anyone else having this problem you need to reboot your mac and press ⌘+R when booting up. Then go into Utilities > Terminal and type the following commands:
This is a result of System Integrity Protection. And it is not recommended to disable it.
As a testament to how good this plugin manager is, I rarely have to deal with it. As a result, I seem to have forgotten a few things when getting my MI MacPro up and running. The mistake was evident when I got the
127 messagedescribed in this issue.Just to share what I should have remembered to perhaps benefit the next:
make sure to install tpm; unless your config checks for it each time…
for whatever reason, I now need to include the following just before the
run "$HOME/.tmux/plugins/tpm/tpm"command (I suspect that my previous.profilesand the like, set the path in addition to what I was doing withfish; not so in the fresh new system):Once you restart your tmux server (or try to trigger the install with
tmux source ~/.tmux.conf), you can test/confirm the plugin manager is working as expected by updating your plugins:The command generates a message with a list of all of the installed plugins, and an option to update any one of them by name or “all”. You may need to run this twice in order to get the full list.
I hope this helps.
Hi,
I recently had a similar issue in WSL2 with Ubuntu-20.04.
Reloading the tmux config was giving me the original error from this issue:
In my case, it turned out that the problem was not with tpm itself, but with my git configuration. I was loading these plugins:
I tried to execute any of them manually, and I realized they were all failing for the same reason: they had CRLF endings.
I have “autocrlf = true” in my .gitconfig. Changing the value isn’t an option for me, so I changed my git attributes file instead:
~/.gitconfig
~/.config/git/gitattributes
After deleting all my plugins and using tpm to download them again, everything worked perfectly. I didn’t even need to keep the line “set-environment -g PATH “/usr/local/bin:/bin:/usr/bin”” in my tmux.conf.
I hope this helps.
Changing the location of the clone worked for me
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpmand updating the tmux config with the following
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins/'And at the very bottom run TPM with
run "${TMUX_PLUGIN_MANAGER_PATH}tpm/tpm"I encountered this again after setting up on a new computer and I found that I had blindly copied the instructions to clone the tpm repository to
~/.tmux/tpmrather than to~/.config/tmux/tpmwhere I actually store my tmux configuration. Hope someone can save a few minutes armed with this if they encounter that themselvesI have the same problem, verify if the ~/.tmux/plugins/tpm exist or clone it.
Hi, I encountered the same problem when I install tpm via home-brew in my MacBook (macOS 13.5) last night. I solved my problem by including
inside my
tmux.conffile based on above suggestions.However, there were some unusual things happened when I was configuring my tmux. The first thing was that if I did not include
/usr/sbin:/sbinin PATH, tmux cpu/gpu stat could not be displayed properly. Besides, tpm home-brew page says that I should includerun '$HOMEBREW_PREFIX/opt/tpm/share/tpm/tpm'in my tmux config file butreturn 127happens. Once I change back torun '/opt/homebrew/opt/tpm/share/tpm/tpm', I can run tpm without any issue, though they should be the same,I got the error simply because of wrong path
~/.tmux/plugins/tpm/tpm@luisdavim did you find any other workaround or is disabling the System Integrity Protection the only solution?
I too was having this issue on OpenBSD 5.9 and 6.0 on 64bit.
For me this was as simple as installing bash as only sh is installed by default.
Installed by tmux and tpm via homebrew on a 2021 M1 Mac. When trying to run
run '/opt/homebrew/opt/tpm/share/tpm/tpm', I got the... returned 1error and then later the... returned 127error when trying to install the plugins. I was able to fix it with theset-environmentsolution offered above.Just wanted to throw in another experience in case it helps.
I had this issue on M3 MacOS 14.3.1 I had installed tmux with homebrew. Trying to source the tmux configuration file would not work at all with the cloned git repository, with any of the suggested path updates prior to running that command. I was able to get it work by installing
tpmvia homebrew as well and includingrun '/opt/homebrew/opt/tpm/share/tpm/tpm'as rickypang0219 mentioned above, and this works without including any path updatesJust tried installing TPM from a fresh FreeBSD 13 installation, using
zshas default shell. It works but it requiresbashwhich wasn’t installed by default (andgitof course).I got the same error on Debian. Solution: After “apt install tmux-plugin-manager”, the correct path is “/usr/share/tmux-plugin-manager/tpm”.
@akashagarwal7 make sure you do not have
set -g update-enviromentthat contains PATH. Otherwise, theset-envwill be ignored.