tmux-plugins / tpm

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

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

Open linux0uid opened 8 years ago

linux0uid commented 8 years ago

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.

fogine commented 8 years ago

'~/.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 :)

maotora commented 8 years ago

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!

mkollaro commented 7 years ago

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.

NanerLee commented 7 years ago

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

Newexplorer commented 5 years ago

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.

dc3671 commented 5 years ago

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
}
ghost commented 5 years ago

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.

RainYuGG commented 4 years ago

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.

godot11 commented 2 years ago

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.