lock_jars command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
lock_jars: command not found
or when using sudo you get the following error message
sudo: lock_jars: command not found
Solutions to lock_jars: command not found
How To Fix lock_jars: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu lock_jars is provided by ruby-jar-dependencies package.
ruby-jar-dependencies is:
jar-dependencies gem provides a simple way to load jars into JRuby’s classloader. It also has additional and very convenient features like: allowing to declare jar dependencies in the gemspec files, vendoring jars with gems if needed, reuse jar files from Maven local repositories, lock down specific jar versions to avoid conflicts and support for proxy and mirrors functionalities thanks to a close integration with Maven.
The idea behind jar-dependencies is to do jar dependencies management in a correct way. It’s somehow similar to the bundler tool but for jars.
To fix this problem, we can install more using the command below.
sudo apt-get -y install ruby-jar-dependencies
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install ruby-jar-dependencies.
sudo apt -y install ruby-jar-dependencies
Or if you have aptitude installed you can use the following command.
sudo aptitude install ruby-jar-dependencies
Summary
In this tutorial we learn how to fix lock_jars command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.