bash-like message about non-installed command in zsh - zsh

For example, I don't have command nethogs installed.
If I type nethogs in bash I get this message:
Command «nethogs» not found, but can be installed with:
sudo apt install nethogs
But if I type nethogs in zsh I get this:
zsh: command not found: nethogs
How can I make zsh to search unknown command in repositories and suggest me to install it?

You should append plugin command-not-found into ~/.zshrc file like that:
plugins=(... command-not-found)
If you don't have command-not-found installed, you can install it with
sudo apt install command-not-found

Related

Permision denied for dotnet

I recently installed dotnet 5.0 on Pop OS but whenever I try to use it it says that I don't have permission.
For example, if I just try to run the command dotnet it gives the the message
cannot snap-exec: cannot exec "/snap/dotnet-sdk/144/snap/command-chain/snapcraft-runner": permission denied
When I run the command as the root user it works perfectly fine.
I don't know if this is because I installed dotnet as a snap package
I had the same issue and unfortunately the dotnet issue page was not working.
To fix this issue I had to install the package with apt instead of snap.
sudo snap remove dotnet-sdk // if needed
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt install apt-transport-https
sudo apt-get install -y dotnet-sdk-5.0
Remove snap first
sudo snap remove dotnet-sdk
Manually download Dotnet SDK https://dotnet.microsoft.com/en-us/download/dotnet/6.0
When your download completes, open the terminal and run the following commands to extract the SDK to make the commands available at the terminal.
mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-6.0.101-linux-x64.tar.gz -C $HOME/dotnet
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
one last thing
Edit shell profile to permanently

ZSH: commands do not support robotframework installation i.e. pip install robotframework command not found

I am Mac User (Big Sur 11.2.3) and I changed the Terminal from bash to zsh. I had a really hard time to install pip and set up the Environment Path and when I came to the point to install robotframework and all the paraphernalia I get a command not found on zsh.
Has someone sorted this out?
~ % pip install robotframework
zsh: command not found: pip
Are you using Python3 (which is installed on MacOS BigSur) to install roboframework?
Check path: which pyhton3
PIP-version: python3 -m pip --version
You can change shells zhs/bash/... for you install session, if that helps (to follow the roboFW install-guides).
zsh: command not found: pip means that the dir containing pip is not in your $path. There's probably something you forgot to copy from your .bashrc file to your .zshrc file. If you're using PyEnv to manage your Python versions (and you should!), then this is the line in question:
eval "$(pyenv init -)"

Running python3 -m venv project return exit status 1

According to the venv documentation in Python3:
Changed in version 3.5: The use of venv is now recommended for creating virtual environments.
With Python3.6 installed in my Ubuntu 16, I tried to create a Python project with command python3 -m venv project, but got the following error:
Error: Command '['/home/me/git/project/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
Question: Why could this have happened? and how to resolve?
sudo apt-get install -y python3-pip is worth a try, based on https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-16-04-server
If that fails, what does python3 --version print?

Using R Shell to Run Unix Installation Commands on Windows

I want to to install bibutils using R on my pc. With unix/ubuntu, I can use "sudo apt-get install bibutils" which works great. I tried using R shell to do the same:
shell('sudo apt-get install bibutils')
and got the following errors:
'sudo' is not recognized as an internal or external command,
operable program or batch file.
Warning messages:
1: running command 'C:\WINDOWS\system32\cmd.exe /c sudo apt-get install
bibutils' had status 1
2: In shell("sudo apt-get install bibutils") :
'sudo apt-get install bibutils' execution failed with error code 1
Is there a better way to do this? Thanks.

Getting error Warning: Could not link libevent. Unlinking

Trying to install tmux on OSX but getting:
$ brew install tmux
Error: You must `brew link libevent' before tmux can
mdurrant#C02MH2DQFD58:~
$ brew link libevent
Linking /usr/local/Cellar/libevent/2.0.21...
Warning: Could not link libevent. Unlinking...
Error: Permission denied - /usr/local/include/event2
I can't use sudo with brew.
I'd tried installing libevent previously by compiling it locally and now I can't seem to get rid of the traces of it, though I went to where I had it and did sudo make uninstall
In the end the answer was:
Install iterm2
brew install automake
brew install pkg-config
rm configure
sh autogen.sh
./configure
make
make install
This helped (http://whiletruecode.com/post/installing-iterm2-and-tmux-osx) and I had an almost identical experience though the final step was not the broken link but to do the above

Resources