If you are trying to install yarn
dependency manager you might face this error that Ubuntu fails to install yarn
and goes on to suggest or install cmdtest
.
Note, selecting 'cmdtest' instead of 'yarn'
This is because there is a different yarn
that is part on cmdtest
package and is older than the yarn
you are trying to install.
![](https://i0.wp.com/www.installing.in/wp-content/uploads/2023/03/cmdtest_instead_of_arn_error.png?resize=668%2C164&ssl=1)
Solving this very simple. Instead of installing via apt
or apt-get
install it via npm
sudo npm install -g yarn
You can now check the version of yarn
with this command
yarn -v
![](https://i0.wp.com/www.installing.in/wp-content/uploads/2023/03/cmdtest_yarn_fixed.png?resize=701%2C163&ssl=1)
That’s it.