Comments (44)
I too have got a 127 error, but that is solely due to my mistake: I did not fetch the tpm
at all. The following line fixed my 127
error:
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
from tpm.
A better way to get around with this is to insert the following line:
set-environment -g PATH "/usr/local/bin:/bin:/usr/bin"
before the first run-shell
/run
command in your ~/.tmux.conf
file, and leave everything else untouched.
from tpm.
If you are using Homebrew >3.0.0, you'll need to add this to your PATH
in tmux.conf
:
set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin"
Notice /opt/homebrew/bin
.
from tpm.
For everyone get 127 error, make tmux
command 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.
$ sudo ln -s /usr/local/bin/tmux /usr/bin/tmux
from tpm.
In newer versions of macOS you can't write to /usr/bin
, not even with sudo.
So you can't run:
sudo ln -s /usr/local/bin/tmux /usr/bin/tmux
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:
csrutil disable
reboot
This is a result of System Integrity Protection. And it is not recommended to disable it.
from tpm.
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 message
described 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.profiles
and the like, set the path in addition to what I was doing withfish
; not so in the fresh new system):set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin"
-
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:`Prefix U`
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.
pdating all plugins! [0/0]
"tmux-yank" update success
"tmux-resurrect" update success
"tmux-sensible" update success
"tmux-battery" update success
"tpm" update success
TMUX environment reloaded.
Done, press ENTER to continue.
I hope this helps.
from tpm.
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:
'~/.tmux/plugins/tpm/tpm' returned 127
TMUX environment reloaded.
Done, press ENTER to continue.
In my case, it turned out that the problem was not with tpm itself, but with my git configuration.
I was loading these plugins:
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
set -g @plugin 'schasse/tmux-jump'
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
[core]
attributesFile = ~/.config/git/gitattributes
~/.config/git/gitattributes
*.sh text eol=lf
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.
from tpm.
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.
from tpm.
@luisdavim did you find any other workaround or is disabling the System Integrity Protection the only solution?
from tpm.
I too have got a 127 error, but that is solely due to my mistake: I did not fetch the
tpm
at all. The following line fixed my127
error:git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
I have the same problem, verify if the ~/.tmux/plugins/tpm exist or clone it.
from tpm.
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
set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin:/usr/sbin:/sbin"
run '/opt/homebrew/opt/tpm/share/tpm/tpm'
inside my tmux.conf
file 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:/sbin
in PATH, tmux cpu/gpu stat could not be displayed properly. Besides, tpm home-brew page says that I should include run '$HOMEBREW_PREFIX/opt/tpm/share/tpm/tpm'
in my tmux config file but return 127
happens. Once I change back to run '/opt/homebrew/opt/tpm/share/tpm/tpm'
, I can run tpm without any issue, though they should be the same,
from tpm.
@akashagarwal7 make sure you do not have set -g update-enviroment
that contains PATH. Otherwise, the set-env
will be ignored.
from tpm.
I got the same error on Debian.
Solution: After "apt install tmux-plugin-manager", the correct path is "/usr/share/tmux-plugin-manager/tpm".
from tpm.
Just tried installing TPM from a fresh FreeBSD 13 installation, using zsh
as default shell.
It works but it requires bash
which wasn't installed by default (and git
of course).
from tpm.
I am using cygwin and had the same problem. This worked for me:
$ git diff
diff --git a/tpm b/tpm
index 570d58b..f764746 100755
--- a/tpm
+++ b/tpm
@@ -41,7 +41,7 @@ set_tpm_path() {
# - no errors raised if directory does not exist
# Files are sourced as tmux config files, not as shell scripts!
source_plugins() {
- "$SCRIPTS_DIR/source_plugins.sh" >/dev/null 2>&1
+ "$SCRIPTS_DIR/source_plugins.sh" 2>&1
}
# prefix + I - downloads TPM plugins and reloads TMUX environment
from tpm.
@vascoosx can you explain why?
from tpm.
@jbnicolai I do not know.
It used to work without that patch and I checked the existence of /dev/null and it was there. I also tried to see if an error occurred with ls > /dev/null
but there was no issue.
from tpm.
I get the same error, It doesn't seem to download the plugins at all. Weirdly it seems to work normally on babun, don't know what they are doing differently...
Edit: The only difference I can see is that cygwin's tmux is 64bit while babun's is 32bit.
Edit 2: Installed cygwin in 32bit and it works now, so there's that.
from tpm.
@smurex I've got this fixed. This problem is because tmux's run-shell
command runs a shell which doesn't read from user configs, thus tmux installed in /usr/local/bin will not be found.
A better solution is shown the next comment, please ignore this one.
```
cd "$(dirname "$0")"
export PATH="/usr/local/bin:$PATH"
# plugins you need
plugins/tmux-yank/yank.tmux
plugins/tmux-recurrect/resurrect.tmux
plugins/tmux-prefix-highlight/prefix_highlight.tmux
```
~~~Then comment out all `run-shell/run` lines in your `~/.tmux.conf`, and add `run ~/.tmux/run.tmux` at the bottom. If you have extra configurations to the plugins, leave them as is.~~~
from tpm.
@shouya is this solution supposed to work if we add the line at the top of .tmux.conf
? I tried both on top of the file and before the first run
command. It isn't working. Perhaps this requires a restart of tmux server?
from tpm.
@akashagarwal7 You might need to restart tmux server for the changed config to apply.
from tpm.
I'm getting this on OpenBSD 6.5 with the OpenBSD stock tmux.
The reason is because this runs $HOME/.tmux/plugins/tpm which runs $HOME/.tmux/plugins/scripts/check_tmux_version.sh. That script contains at call to tmux -V on line 52.
The OpenBSD version of tmux does not have the -V flag. Not sure of the right solution though, still too new to tmux to know if the OpenBSD version has the features you require.
from tpm.
Cygwin users:
You can get further insight by executing the installation script directly with ~/.tmux/plugins/tpm/scripts/install_plugins.sh
. I found this was showing "download fail" for all plug-ins. On further inspection it was the git
command specifically causing it.
Looks like there was a possible conflict between "Git for Windows" and Git through Cygwin's package manager. I resolved this problem by adding the git
package via Cygwin installer, then remove it, then restart tmux so that Git for Windows is used.
Finally, I still get code 127 by pressing prefix + I
, though calling the script it invokes directly with .tmux/plugins/tpm/bindings/install_plugins
works fine:
TMUX environment reloaded.
Done, press ESCAPE to continue.
Possibly related is the space in my user profile path? '/cygdrive/c/Users/Adam Reece/.tmux/plugins/tpm/bindings/install_plugins'
from tpm.
I got the error simply because of wrong path ~/.tmux/plugins/tpm/tpm
from tpm.
I too have got a 127 error, but that is solely due to my mistake: I did not fetch the
tpm
at all. The following line fixed my127
error:git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
this problem still exists (at least in my machine), tmux 3.1c, zsh 5.3, macOS Mojave, and cloning the non-existing tpm plugin fixed it!
from tpm.
Thanks for the suggestion. Unfortunately that doesn't resolve the issue on Cygwin.
from tpm.
Hello! I still have this error.
~/.tmux/tmux.conf
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# vim-like pane bindings
bind j select-pane -D
bind k select-pane -U
bind h select-pane -L
bind l select-pane -R
# Options
set-option -g prefix C-b
set-option -g status-interval 5
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
set -g status-position bottom
set -g mouse on
# Terminal Setup
set -g default-terminal "screen-256color"
set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin"
run-shell "echo 'which tmux'"
run-shell "which tmux"
# Set up Powerline
run-shell "powerline-daemon -q"
source /usr/local/lib/python3.9/site-packages/powerline/bindings/tmux/powerline.conf
run-shell "echo 'powerline done'"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
run-shell "echo 'set plugins'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.config/tmux/plugins/tpm/tpm'
run-shell "echo 'initialized'"
Output from : source ~/.config/tmux/tmux.conf
which tmux
/usr/local/bin/tmux
powerline done
set plugins
initialized
'~/.config/tmux/plugins/tpm/tpm' returned 127
- tmux -V: tmux 3.2a
- shell: fish, version 3.3.1
from tpm.
Does the path to your home directory have any spaces?
from tpm.
Does the path to your home directory have any spaces?
$ echo $HOME
/Users/bennyp
from tpm.
I should have mentioned earlier, this is in hyper terminal as well as macOS terminal
from tpm.
Moved to WSL2 with Ubuntu-20.04
This is my environment:
> tmux -V
tmux 3.0a
This is my TPM config in .tmux.conf
# TPM
# list of plugins
set -g @plugin '.tmux-plugins/tpm'
set -g @plugin '.tmux-plugins/tmux-sensible'
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'
set -g @continuum-restore 'on'
set-environment -g PATH "/usr/local/bin:/bin:/usr/bin"
run '~/.tmux/plugins/tpm/tpm'
This is what I get when running the install script:
> ./.tmux/plugins/tpm/scripts/install_plugins.sh
Already installed "tpm"
Installing "tmux-sensible"
"tmux-sensible" download fail
Installing "tmux-yank"
"tmux-yank" download fail
Installing "tmux-open"
"tmux-open" download fail
Installing "tmux-resurrect"
"tmux-resurrect" download fail
Installing "tmux-continuum"
"tmux-continuum" download fail
This plugin manager never worked for me.
from tpm.
I too have got a 127 error, but that is solely due to my mistake: I did not fetch the
tpm
at all. The following line fixed my127
error:git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
this operation solved my 127 error, but then I have a 1 error
'~/.tmux/plugins/tpm/tpm' returned 1
from tpm.
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:
'~/.tmux/plugins/tpm/tpm' returned 127 TMUX environment reloaded. Done, press ENTER to continue.
In my case, it turned out that the problem was not with tpm itself, but with my git configuration. I was loading these plugins:
set -g @plugin 'tmux-plugins/tmux-battery' set -g @plugin 'MunifTanjim/tmux-mode-indicator' set -g @plugin 'schasse/tmux-jump'
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
[core] attributesFile = ~/.config/git/gitattributes
~/.config/git/gitattributes
*.sh text eol=lf
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.
This was my issue -- Thank you!
from tpm.
@devnoot i get the same issue, can u share any solution ??
from tpm.
@kamalkech see @sarahlagh 's comment and check your git settings. I fixed my issue by removing the autocrlf = true
line.
from tpm.
@devnoot i get the same issue, add code set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin"
not working, why?
from tpm.
im on wsl ubuntu 22.04 tmux: 3.3a and my tmux confix whenever i source/restart tmux gives me 127 error but i dont really have anything in it besides this
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
#
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin '[email protected]:user/plugin'
# set -g @plugin '[email protected]:user/plugin'
#
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
and it doesnt allow for gaps in the conf at all
i just dont even know where to begin with the problem
from tpm.
I ran into this issue on OpenWRT. Turns out tpm needs bash to function since it is a bash script, just install bash even if you don't use it yourself.
from tpm.
im on wsl ubuntu 22.04 tmux: 3.3a and my tmux confix whenever i source/restart tmux gives me 127 error but i dont really have anything in it besides this
# List of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' # # Other examples: # set -g @plugin 'github_username/plugin_name' # set -g @plugin 'github_username/plugin_name#branch' # set -g @plugin '[email protected]:user/plugin' # set -g @plugin '[email protected]:user/plugin' # # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.tmux/plugins/tpm/tpm'
and it doesnt allow for gaps in the conf at all i just dont even know where to begin with the problem
Same issue, whether I have plugins referenced or not, always getting error 127. Recently upgraded to Ubuntu 22.04.2 LTS for WSL2 I'm almost certain that's the issue but no solutions referenced here fix the issue.
Edit of shame: although I thought my ansible script had cloned the tpm repo, it hadn't, I simply didn't have tpm cloned...
from tpm.
Hi I encounted the problem using WSL windows running Ubuntu. I am not exactly sure how I solved the issue but it was a combination of running the following:
bash -x ~/.tmux/plugins/tpm/scripts/install_plugins.sh
Then if the some plugins appear installed then, I tried to create a symbolic link as per @wd first comment
$ sudo ln -s /usr/local/bin/tmux /usr/bin/tmux
Then I noticed that I get an "tmux tpm returned 1"
Next I checked since running WSL that git is installed on the Ubunutu instance and then installed git using homebrew.
I then removed the symbolic link and checked again if the plugins could be installed or not
bash -x ~/.tmux/plugins/tpm/scripts/install_plugins.sh
After this I then changed the run command at the bottom of the .tmux.conf
from run '$HOME/.tmux/plugins/tpm/tpm'
to run '~/.tmux/plugins/tpm/tpm'
After doing all these steps tom stopped returning 127 and stopped returning 1.
from tpm.
Had this issue recently. I tried a number of solutions listed here but none worked. I had to kill all running tmux sessions with tmux kill-server
. After that, I started a new session, ran the install commands again and it worked
from tpm.
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 tpm
via homebrew as well and including
run '/opt/homebrew/opt/tpm/share/tpm/tpm'
as rickypang0219 mentioned above, and this works without including any path updates
from tpm.
I'm kind of stuck in this. I'm using MacOS 14.3.1 with iTerm2 and tmux 3.3a.
I've tried all the solutions above, including the last one that should perfectly fit my case, without success (although the last one from @ArykLAnderson is the one that produced some improvement).
I'm at the point where my configuration correctly reloads and installs the plugins (but I'm not sure if this really worked, as I have a theme installed but it doesn't show up), but then, if I try to reload it again or I open a new session, I get:
'/opt/homebrew/opt/tpm/share/tpm/tpm' returned 1
'~/.tmux/plugins/tpm/tmp' returned 12
I would like to avoid uninstalling and reinstalling iTerm2, and I think this should be fixable even without uninstall/reinstall stuff.
Clearly there's something in my setup that doesn't work or I did something wrong at some point. Does anyone have any advice for me?
Here is my .tmux.conf
unbind C-b
set -g prefix C-Space
bind-key C-Space send-prefix
# should fix the problem with error 127
set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin:/usr/sbin:/sbin"
run '/opt/homebrew/opt/tpm/share/tpm/tpm'
# Split View
unbind '"'
unbind %
bind V split-window -h
bind H split-window -v
# Set correct support for italic fonts
set -g default-terminal "tmux-256color"
# reload configuration
unbind r
bind r source-file ~/.tmux.conf /; display "Config reloaded."
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# switch panes using jkhl
bind h select-pane -L
bind l select-pane -R
bind j select-pane -U
bind k select-pane -D
# maximize current panel
bind -r m resize-pane -Z
# Mouse
set -g mouse on
# Remove delay when hitting escape
set -s escape-time 0
##############
# #
# tpm plugin #
# #
##############
set -g @plugin 'tmux-plugins/tpm'
# list of tmux plugins
set -g @plugin 'christoomey/vim-tmux-navigator' # for navigating panes and vim/nvim with Ctrl-hjkl
# set -g @plugin 'jimeh/tmux-themepack' # to configure tmux theme
set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restart
set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions for you every 15 minutes
# set -g @themepack 'powerline/default/cyan' # use this theme for tmux
set -g @plugin 'fabioluciano/tmux-tokyo-night'
set -g @resurrect-capture-pane-contents 'on' # allow tmux-ressurect to capture pane contents
set -g @continuum-restore 'on' # enable tmux-continuum functionality
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
setenv -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.tmux/plugins/"
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
run '~/.tmux/plugins/tpm/tmp'
Thanks a lot!
from tpm.
for Chimera Linux I need to install bash
to make it work (fix 127 error for me)
from tpm.
Related Issues (20)
- Load time is significantly long while tpm is enabled
- [discussion] bundle several tmux plugins under a common umbrella organization for visibility
- TPM does not install plugins on M1 Mac (Ventura) HOT 8
- Nix formula please? HOT 1
- NetBSD - TPM locks up the entire system. HOT 4
- Is there a way to install plugins to another directory? HOT 7
- How to install plugins automatically? HOT 2
- Implementing an embedded plugin list in tpm? HOT 1
- how to update TPM itself? HOT 2
- TPM is apparently installing plugins but they are not loaded. Windows 10 WSL2 Ubuntu. HOT 1
- Tmux output numbers separated by semicolon at startup HOT 7
- TPM should account for the repository's author to prevent naming conflicts HOT 1
- Sourcing tmux conf returns 126 in WSL Ubuntu HOT 4
- '~/.local/share/tmux/plugins/tpm/tpm' returned 1 on macOS Sonoma 14.3.1 HOT 3
- tpm does not works on macbook pro m3 pro HOT 2
- Fix the instructions on changing plugins install dir HOT 1
- Install plugin from subdirectory HOT 1
- Most plugins are not being installed and loaded HOT 3
- Fix: cannot set variables with a name whose prefix is `plugin` HOT 1
- GitHub rejects clones using user:pass:?@host construction HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tpm.