tpm icon indicating copy to clipboard operation
tpm copied to clipboard

'~/.tmux/plugins/tpm' returned 126

Open linux0uid opened this issue 9 years ago • 10 comments

#51

I have the same error but with right path '~/.tmux/plugins/tpm/tpm' returned 126

I downloaded the latest versions of tpm and extracted all in plugins folder in my ~/.tmux/ directory. '~/.tmux/plugins/tpm/tpm' - the executable file in my system

use with bash, zsh tmux 2.1 tpm - master branch, realise v.3.0.0.

linux0uid avatar Mar 26 '16 16:03 linux0uid

'~/.tmux/plugins/tpm/tpm' - the executable file in my system

Does that mean that ~/.tmux/plugins/tpm/tpm file has permissions to execute by owner/group ? When I cloned the repository, all shell files had only read permissions. All shell scripts of tpm plugin must be executable.

cd ~/.tmux/plugins/tpm/
chmod ug+x ./tpm
chmod ug+x ./bin/*
chmod ug+x ./bindings/*
chmod ug+x ./scripts/**/*
chmod ug+x ./tests/**/*

Maybe, it would be worth to add this to Help, tmp not working! @bruno- ?

Thanks for great work btw :)

fogine avatar Mar 27 '16 10:03 fogine

I get this same errror. I also thought the same but wasn't quite sure. Why shouldn't you make that whole folder +x or would the other files be of any harm with +x ;)

i'm talking about chmod -R ug+x ~/.tmux/plugin/tpm/tpm

And i've just realized that my ~/.tmux/plugins had two tpm folders.

It looks like ~/.tmux/plugins/tpm/tpm/tpm-content

And this caused issues, so i had to

run '~/.tmux/plugins/tpm/tpm/tpm' in my tmux config to make this work!

maotora avatar Apr 03 '16 09:04 maotora

I also had this problem. It happened because the exec flag was lost when I copied ~/.tmux to a different computer. Just using chmod on tpm files wasn't enough, since exec flags were lost from the other plugins too. I recommend deleting the other plugins and just installing them again.

mkollaro avatar Nov 04 '16 17:11 mkollaro

I think you can try to reinstall tpm. I also had this problem, because I copy the files from another pc to my pc. I reinstall it, then it's ok

NanerLee avatar Dec 02 '16 11:12 NanerLee

I had the same error, but then I noticed that I hadn't added the plugin to my ~/.tmux.conf file. So adding: set -g @plugin 'tmux-plugins/tmux-yank' to my ~/.tmux.conf file solved the issue.

Newexplorer avatar Dec 15 '18 08:12 Newexplorer

It's a really strange bug. I tried edit ~/.tmux/plugins/tpm/tpm and add echo 1 among the main functions. Then I run tmux source ~/.tmux.conf found it works!!! Maybe it just need to refresh the temp or cache?

main() {
    if supported_tmux_version_ok; then
        set_tpm_path
        echo "1"
        set_tpm_key_bindings
        echo "2"
        source_plugins
        echo "3"
    fi
}

dc3671 avatar Apr 24 '19 15:04 dc3671

I just ran into this issue myself. I tried to delete my .tmux directory reinstall tpm and the few plugins I have and I'm getting the same thing. Then randomly it will load out of the blue and work fine after a few hours of my computer running which is even more strange.

ghost avatar Oct 04 '19 17:10 ghost

I add the exit 0 in the end after the line of calling main function in

~/.tmux/plugins/tpm/tpm

And it won't return 126 in bash. all tpm prefix function work.

RainYuGG avatar Jan 16 '20 17:01 RainYuGG

I add the exit 0 in the end after the line of calling main function in

~/.tmux/plugins/tpm/tpm

And it won't return 126 in bash. all tpm prefix function work.

This is a symptoms-only "fix". The sick are still dying, they just don't feel it anymore.

Something in main fails with exit code 126, main inherits it, and then the script returns the exit code of main. This way you force it to return 0 without giving a damn about previous errors. Pretend everything is fine while the house is on fire. Whatever failed still fails, probably leading to much more obscure errors later.

godot11 avatar Jul 21 '22 09:07 godot11