Re: [kubernetes/kubernetes] kubectl -bash: _init_completion: command not found (#12400)

360 views
Skip to first unread message

Michail Kargakis

unread,
Jun 9, 2017, 1:23:47 PM6/9/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@kubernetes/sig-cli-misc


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Eric Paris

unread,
Jun 10, 2017, 12:50:07 AM6/10/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

This was fixed a long time ago. Closing.

Eric Paris

unread,
Jun 10, 2017, 12:50:14 AM6/10/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Closed #12400.

Yaniv Kaul

unread,
Aug 17, 2017, 8:35:31 AM8/17/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Doesn't work for me: CentOS 7.3, bash-completion 2.1-6.el7, kubectl-1.7.3-1

Alexey Volkov

unread,
Aug 20, 2018, 6:31:10 PM8/20/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Not working on Google Cloud Debian VM with bash-completion 2.1-4.3.

unlikezy

unread,
Aug 2, 2019, 3:30:01 AM8/2/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

After have done all things on https://kubernetes.io/docs/tasks/tools/install-kubectl/ on my iMac, I still got error: type _init_completion not found.
And finally I found that, although I have update my bash, and I did got this message:

$which bash
/usr/local/bin/bash
$bash --version
GNU bash, version 5.0.7(1)-release (x86_64-apple-darwin18.5.0)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

BUT, my terminal was still using old bash in fact:

$env
SHELL=/bin/bash
$/bin/bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)
Copyright (C) 2007 Free Software Foundation, Inc.

Need to change my default shell by typing command

chsh -l /usr/local/bin/bash

and it work.

Massimo Vannucci

unread,
Sep 10, 2019, 12:29:32 PM9/10/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Need to change my default shell by typing command

chsh -l /usr/local/bin/bash

and it work.

Did you mean sudo chsh -s /usr/local/bin/bash instead?
Thanks anyway for the hint!

Viacheslav Vasilyev

unread,
Jun 9, 2023, 8:22:30 AM6/9/23
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

it's 2023, if you're still getting this error on macos try another package called bash-completion@2

brew unlink bash-completion
brew install bash-completion@2
exit


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are on a team that was mentioned.Message ID: <kubernetes/kubernetes/issues/12400/1584488873@github.com>

Trevor N. Suarez

unread,
Feb 20, 2024, 8:41:00 PM2/20/24
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@avoidik Thank you for this! I was using a new Bash version, but was still using the older (default) bash-completion from Homebrew. Installing the newer bash-completion version for my newer Bash version fixed it for me.

Simple as brew unlink bash-completion && brew install bash-completion@2 for me!

Thanks again!


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are on a team that was mentioned.Message ID: <kubernetes/kubernetes/issues/12400/1955711404@github.com>

Reply all
Reply to author
Forward
0 new messages