apt install unable to locate executable
<p>I have read a few other threads similar to this one on stack overflow, but I've been unable to solve my problem.</p>

<p>I am trying to install a package.</p>

<pre><code>apt install libgnutls28-dev
</code></pre>

<p>however, I get the following error.</p>

<pre><code>Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/apt" (-1)
</code></pre>

<p>Other people have been able to solve this error by setting the java home environment variable in the terminal.</p>

<pre><code>export JAVA_HOME=/Library/Java/Home
</code></pre>

<p>I have tried this, and then run apt install again, but recieved the same error:</p>

<pre><code>Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/apt" (-1)
</code></pre>

<p>Any help is appreciated!</p>