title: How to configure R-3.1.2 with --enable-R-shlib
body: <p>I had installed R-3.1.2 on Ubuntu using the commands</p>
  
  <pre><code>wget http://cran.r-project.org/src/base/R-3/R-3.1.2.tar.gz
  tar xvfz R-3.1.2.tar.gz
  cd R-3.1.2
  ./configure
  make
  sudo make install
  </code></pre>
  
  <p>When I tried to launch RStudio I got the error</p>
  
  <blockquote>
    <p>R shared library (/usr/local/lib/R/lib/libR.so) not found. If this is a custom build of R, was it built with the --enable-R-shlib option?</p>
  </blockquote>
  
  <p>So I went back and tried to reconfigure with</p>
  
  <pre><code>./configure --enable-R-shlib=yes
  make
  </code></pre>
  
  <p>But I got the error</p>
  
  <pre><code>collect2: error: ld returned 1 exit status
  make[3]: *** [libR.so] Error 1
  make[3]: Leaving directory `/usr/local/lib/R-3.1.2/src/main'
  make[2]: *** [R] Error 2
  make[2]: Leaving directory `/usr/local/lib/R-3.1.2/src/main'
  make[1]: *** [R] Error 1
  make[1]: Leaving directory `/usr/local/lib/R-3.1.2/src'
  make: *** [R] Error 1
  </code></pre>
  
  <p>When searching stack overflow, I found an answer here:
  <a href="https://stackoverflow.com/questions/20561190/how-to-configure-r-3-0-1-with-enable-r-shlib">How to configure R-3.0.1 with --enable-R-shlib</a>
  that suggested that the problem was that I was trying to compile in a directory that I had previously compiled without the "--enable-R-shlib" option</p>
  
  <p>I tried to fix the problem by using the commands</p>
  
  <pre><code>make uninstall
  </code></pre>
  
  <p>which gives no errors by many "Nothing to be done for `uninstall'." statements, but it did successfully uninstall R</p>
  
  <pre><code>./configure --enable-R-shlib=yes
  </code></pre>
  
  <p>which gives the error</p>
  
  <pre><code>config.status: error: cannot find input file: `src/library/base/DESCRIPTION.in'
  </code></pre>
  
  <p>then</p>
  
  <pre><code>make
  </code></pre>
  
  <p>which gives the same error as when I tried to make before.</p>
  
  <p>Can you help me see where I have gone wrong?</p>