Execute the following command:
sudo apt remove cmdtest
sudo apt remove yarn
sudo npm install -g yarn
Note: after the command, you need to restart the terminal and then enter yarn install
Execute the following command:
sudo apt remove cmdtest
sudo apt remove yarn
sudo npm install -g yarn
Note: after the command, you need to restart the terminal and then enter yarn install