title: Install lme4 from CRAN on Ubuntu
body: <p>I'm having trouble installing the <code>lme4</code> package from CRAN on Ubuntu 18.04. I'm running <code>install.packages(&quot;lme4&quot;)</code> on R 3.4.4 and get the following error:</p>
  <pre><code>ERROR: configuration failed for package ‘nloptr’
  * removing ‘/home/peter/R/x86_64-pc-linux-gnu-library/3.4/nloptr’
  ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
  * removing ‘/home/peter/R/x86_64-pc-linux-gnu-library/3.4/lme4’
  </code></pre>
  <p>Looking more closely, I see these two error lines:</p>
  <p><code>libtool: link: ERROR: no information for variable 'AR' cru .libs/libutil.a .libs/mt19937ar.o .libs/sobolseq.o .libs/timer.o .libs/stop.o .libs/redblack.o .libs/qsort_r.o .libs/rescale.o</code></p>
  <p><code>checking for ranlib... ERROR: no information for variable 'RANLIB'</code></p>
  <p>However, both <code>ar</code> and <code>ranlib</code> commands work on my machine. What may be the cause of the errors?</p>