I have uninstalled minikube through this post and now every time I open the terminal this message appears:
kubectl: command not found
Command 'minikube' not found, did you mean:
command 'minitube' from deb minitube
Try: sudo apt install <deb name>
I have no idea what is going on. Can someone help me to stop this message from appearing?
You probably have entries in your ~/.bashrc file that are both calling minikube or/and kubectl. Just edit/remove those entries. For example:
vi ~/.bashrc
In the vi editor:
/kubectl
dd
/minikube
dd
:wq
Related
I was trying to install yabai on my Big Sur mac, and ran into an issue when trying to do visudo. After some playing around, I found that I was running into issues even with just sudo visudo (i.e., the problem isn't with yabai):
❯ sudo visudo
Timeout waiting for detached instance to start: No such file or directory
visudo: /etc/sudoers.tmp unchanged
Nor does adding an editor flag work:
❯ sudo EDITOR="vim" visudo
Timeout waiting for detached instance to start: No such file or directory
visudo: /etc/sudoers.tmp unchanged
❯ sudo EDITOR="nano" visudo
Timeout waiting for detached instance to start: No such file or directory
visudo: /etc/sudoers.tmp unchanged
I'm using zsh.
Would any of you happen to know how to get around this?
Thanks very much in advance!
It looks like visudo is trying to run Sublime Text despite your use of an EDITOR environment variable. I suspect that this is because you have it set in the SUDO_EDITOR or VISUAL environment variables, both of which take precedence over EDITOR if they're set. Try sudo SUDO_EDITOR="vim" visudo or sudo SUDO_EDITOR="nano" visudo instead.
If that isn't it, the other possibility is that in your sudoers file, env_editor is disabled and so editor is forcing the use of Sublime Text.
I am getting the following error while running command "apt-get update":
E: Type 'gpg' is not known on line 1 in source list /etc/apt/sources.list.d/openvpn-as-repo.list
E: The list of sources could not be read.
Can someone please help me solve this error?
The below answer is taken from: https://askubuntu.com/questions/96967/how-do-i-fix-this-e-type-is-not-known-on-line-in-source-list-update
The error indicates a malformed entry in a source file, which causes the update process to abort. To fix it, you have to either fix the entry (if you know what the right entry should look like) or remove it altogether (that's what I'm going to describe, as it's the fastest way to enable you to update your system again).
First, you need to open the file containing the bad entry. The filename is given in the error message, in your example /etc/apt/sources.list.d/some-ppa.list. Open a terminal, and type
sudo nano /etc/apt/sources.list.d/some-ppa.list
and press Enter. After entering your password, you should now see the file opened in the text editor nano.
Now you need to locate the malformed entry. It should be on the line number given in the error message - in your case that would be line 1.
This line should be incomplete and start with the unknown type the update process is complaining about (here ain). Just delete the whole line, and save/close the file with Ctrl+X.
That's it. You should now be able to successfully run the update process.
It seems something went wrong. Redo these commands again.
# wget must be available. If wget is not installed and apt update is broken skip apt update in the next line.
sudo apt update && sudo apt -y install ca-certificates wget net-tools
wget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | sudo apt-key add -
sudo sh -c 'echo "deb http://as-repository.openvpn.net/as/debian bionic main">/etc/apt/sources.list.d/openvpn-as-repo.list'
sudo apt update && sudo apt -y install openvpn-as
I have been following this class which has instructed me to open atom through my ubuntu terminal with the command "atom ." but it prints "command not found"
I know now that the ubuntu system and windows system run independently of each other, but still have no clue how to make it work.Here is the error
No command 'atom' found, did you mean:
Command 'atrm' from package 'at' (main)
Command 'atoms' from package 'horae' (multiverse)
Command 'atom4' from package 'atom4' (universe)
Command 'atobm' from package 'x11-apps' (main)
Command 'atop' from package 'atop' (universe)
atom: command not found
Install again if you have to (there is no hurt in doing so).
Try this link: atom install.
In summary, this is what the link says to do. (When executing these commands in your terminal, look to see if you get any output back. Observe if the terminal spits out errors.)
First in a terminal copy and paste the below then hit enter:
wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
Then copy and paste the below into a term and hit enter:
sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
Then this:
sudo apt-get update
Then:
sudo apt-get install atom
Finally, see if you are able to open atom:
atom .
I am installing nvm inside docker. After I've finished installing it says to run echo ". ~/.nvm/nvm.sh" >> ~/.bash_profile and then close and reopen terminal.
I think the above procedure updates bash profile and let me access nvm.sh from bash with nvm command. But, to do this, I have to close and reopen bash/terminal.
Is there anyway to do this or I've to stop docker container and then run it again?
Maybe this will help with docker, to run scripts in running docker image, you can attach it to bash, reopen the instance with new profile:
docker ps -all #to get container id
docker exec -i -t 38ad5f94df4d /bin/bash
-t container id or container name
~/.bash_profile is sourced only by login instances of bash, presumably thats why they have said you to logout and then login.
If the only change you have made to ~/.bash_profile is adding the . ~/.nvm/nvm.sh, then you can have the same effect as far as the shell is concerned by source-ing the file in the current shell instance:
. ~/.nvm/nvm.sh
This of course covers only the bash's aspect, not docker as a whole.
I used home-brew to setup tmux on a mac. When trying to run tmux I keep on getting this error
open terminal failed: missing or unsuitable terminal: xterm-256color
any suggestions?
Your system doesn't have xterm-256color. You could:
Set TERM to something other than xterm-256color outside tmux (try just plain export TERM=xterm).
See if there is a package containing xterm-256color, perhaps a later version of ncurses or terminfo.
Install it manually from another system with something like:
infocmp -x xterm-256color > out
Then transfer the "out" file to your Mac and try:
tic out
This happened to me during a system upgrade. Unfortunately I did not see a way besides restarting: tmux kill-server and then run tmux.
you can just type export TERM=xterm in console when you see this error, or put export TERM=xterm in the file ~/.bash_profile and source ~/.bash_profile. then you may never get this error again.
This works fine on my debian.
TL;DL
sudo ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color
Details
Maybe the file /usr/share/terminfo/x/xterm-256color is corrupted. It may be fixed upon (system/package) upgrade / reinstall.
Meanwhile you can use other terminfo entry. You can get the available options by ls /usr/share/terminfo/x.
I am having the same problem and using xterm-16color meanwhile.
To set terminfo, you can type reset in the terminal, then select the terminfo:
username:~$ cd /usr/share/terminfo/x
username:x$ ls
x10term xnuppc+200x64 xterm-24 xterm+pcfkeys
x1700 xnuppc-200x64-m xterm-256color xterm-pcolor
x1700-lm xnuppc-200x75 xterm+256color xterm-r5
...
username:x$ reset
reset: unknown terminal type xterm-256color
Terminal type? xterm-16color
=== Edit 2018 Feb 20 ===
You should config the term in many places if you want to make it permanent, for example, .vimrc, .tmux.config, .Xresources, e.t.c.
I still have issue when using terminator -x 'tmux attach -t music; exec bash'
So I'm using a quick hack as below:
cd /usr/share/terminfo/x
sudo mv xterm-256color xterm-256color.bk
sudo ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color
When I removed some sessions/windows this error went away for me. Apparently I had too many TTY's open.
You can kill sessions/windows from outside tmux with these commands:
tmux kill-session -t <session-name>
tmux kill-window -t <session-name>:<window-name>
I am also having the same issue.
export TERM=xterm
tmux kill-server
This helps solve the problem: https://www.peterdavehello.org/2019/11/tmux-open-terminal-failed-missing-or-unsuitable-terminal-xterm-256color/
In my case Xterm was absent.
(But I had the same error on Ubuntu)